4 ms·
I think the biggest difference is that Stores don't necessarily contain just one object. They are state containers, so where with a Model you would have singula
by thekenwheeler 12y ago
I think the biggest difference is that Stores don't necessarily contain just one object. They are state containers, so where with a Model you would have singular object based static methods, in a Store you could have methods to manipulate or return any of the objects it contains.
- megaman821 12y agoFair enough, but why coordinate Store actions through a Dispatcher? Is there much to gain over just calling a method on the Store?
- thekenwheeler 12y agoThe Dispatcher is helpful because, using the waitFor method, you can marshall the callbacks to enforce an explicit update order in the event that there are dependencies.
- lfischer 12y agoFor me, the gain is that you can track all interactions in a single spot. If stores trigger updates on each other, you end up with a web of dependencies that take a long time to trace through when making changes or debugging.