|
|
|
|
|
by oblique63
4331 days ago
|
|
Maybe I'm not getting something, but all this Flux stuff reminds me a lot of DDD+CQRS (domain driven design w/ command query response segregation), to the point where it seems like it's the same concepts repackaged with different terminology. This post in particular seems to be advocating the concept of having a single 'aggregate root' as opposed to independently loaded 'entities', and Flux sounds like it just advocates the use of an 'event bus' to send separate 'read'/'write' 'commands' to 'domain objects'... the main difference of course being that all this recently has been specifically with the browser in mind. Is that a reasonable assessment? |
|
Amongst people that I associate with that build complex web apps, there's been an ongoing debate on whether a centralized event dispatch (what Flux advocates) is preferable to decentralized event emitting components (what Backbone and web components advocate).
For most of my career, I've been a fan of decentralized event emitting components. However, with Om's persistent data structures and functional render loop, having all of your data in a single place is suddenly a lot more palatable. From there, I think the event bus approach flows naturally.
Or at least, that's what I'm thinking now :) I still haven't written something with complex enough tests and other external dependencies to have gotten bit by this yet.