2 ms·
I have only very briefly looked at ELM. There is one thing I’m not clear about with the ELM architecture. Is the Model a tree with one to one correspondence wit
by jbritton 5y ago
I have only very briefly looked at ELM. There is one thing I’m not clear about with the ELM architecture. Is the Model a tree with one to one correspondence with the GUI tree? If so, I assume this implies duplicate model entries if the same UI element is in two different branches.
This would seem to imply that the Model is a ViewModel and not the ultimate Model.
- indigo945 5y agoNo, I don't think your model must necessarily have the same topology as the view. However, the "model" most certainly resembles a view model, it's not generally something that you write to disk (although you could do it if you really wanted to). The difference between this model and the view model from MVVM is that in MVVM, the view model contains runtime objects and handles such as sockets, file handles, database connections, service locators and so on, whereas the model in the Elm philosophy keeps those elsewhere, in the realm of messages and updates.