A lot of this seems like it's just MVC, except what they call the "View" is a traditional MVC Controller (the UI element that handles user interactions and sends these to the Model), what they call the "Controller-View" is a traditional MVC View (something that gets notified when the Model changes and displays that change to the user), and what they call the Dispatcher is what traditional MVC calls the Model. They wr…
Facebook Flux – Application Architecture for Building User Interfaces
51–59 of 59 posts
Re: Facebook Flux – Application Architecture for Building User Interfaces
#52A lot of this seems like it's just MVC, except what they call the "View" is a traditional MVC Controller (the UI element that handles user interactions and sends these to the Model), what they call the "Controller-View" is a traditional MVC View (something that gets notified when the Model changes and displays that change to the user), and what they call the Dispatcher is what traditional MVC calls the Model. They wr…
The main difference between Flux and MVC is the unidirectional data flow. In MVC, a controller updates a model which updates a view which again talks directly to a model that might invoke another view which again might cause a model update, and so on. In Flux, the only thing a view can do is to invoke actions on the top-level dispatcher. Furthermore, views are never partially updated, they are always re-rendered from…
Re: Facebook Flux – Application Architecture for Building User Interfaces
#53I'm still somewhat unclear on the point of the Dispatcher and Actions and they simply feel like needless indirection to me. For instance, in the flux-chat app within the linked repo, the MessageComposer component calls `ChatMessageActionCreators.createMessage(text);` when the user press the enter key to submit a message. To find out how that ends up affecting the application, you need to jump around more than a coupl…
You are absolutely right that actions are just another level of abstraction that come with their own pain, and if the pain they bring does not relieve an even greater pain of not having them then there is no reason to introduce them yet. In our app, we started feeling the growing pain of a laissez faire approach to internal comms. For us, a user interaction can generate multiple logical state changes in the app, and…
We're also starting to see a lot of the many-to-many relationships in actions you mentioned, which convinces me we need to work towards more of a Flux architecture (it wasn't out yet when we started this lo those many months ago).
Re: Facebook Flux – Application Architecture for Building User Interfaces
#54Earlier quoted context omitted.
You are absolutely right that actions are just another level of abstraction that come with their own pain, and if the pain they bring does not relieve an even greater pain of not having them then there is no reason to introduce them yet. In our app, we started feeling the growing pain of a laissez faire approach to internal comms. For us, a user interaction can generate multiple logical state changes in the app, and…
I'd be very interested in seeing some Crossfilter-based filtering store code. I've been working on a business application that needs to do quite a bit of filtering and hierarchical rollups, and I'd really like to start using Crossfilter for it so we can chuck the much more limited tool I whipped up when we started the project and get that speed boost you mention. We're also starting to see a lot of the many-to-many r…
Re: Facebook Flux – Application Architecture for Building User Interfaces
#55Re: Facebook Flux – Application Architecture for Building User Interfaces
#56Earlier quoted context omitted.
I'm the author of Fluxy and would be happy to answer any questions here. The big benefits of Fluxy vs other Flux approaches is that 1) Stores are built on top of immutable data structures (via ClojureScript / mori) 2) Server side rendering is baked in (or will be as of 0.4) I'd also mention https://github.com/spoike/reflux as an implementation.
Thanks for mentioning my project, Reflux. I initially thought that the suggested implementation by Facebook was a bit weird because it requires a lot of boiler plate code. For the longest time I disliked using magic strings for type checking since it breaks the concept of polymorphism. In Javascript it is even more weird considering it is a dynamic language. So I fixed that by moving the type specifics (which in Flux…
Re: Facebook Flux – Application Architecture for Building User Interfaces
#57How does this compare with FRP? I've been thinking about this and concluding that React wouldn't benefit even a little from those FRP libraries and architecture, it is already quite functional reactive. Am I wrong?
React is not functional reactive by itself. Although there's no stopping people from integrating it with other FRP libraries.
Re: Facebook Flux – Application Architecture for Building User Interfaces
#58So, does this make stores 'Flux capacitors'? (pretty pls)
Re: Facebook Flux – Application Architecture for Building User Interfaces
#59Earlier quoted context omitted.
I'm the author of Fluxy and would be happy to answer any questions here. The big benefits of Fluxy vs other Flux approaches is that 1) Stores are built on top of immutable data structures (via ClojureScript / mori) 2) Server side rendering is baked in (or will be as of 0.4) I'd also mention https://github.com/spoike/reflux as an implementation.
I've been reading about ClojureScript/OM and mori. What example apps are online using either of them? This is what I've found so far. ClojureScrpt/OM: https://github.com/swannodette/om (several examples linked) http://rigsomelight.com/2014/05/01/interactive-programming-f... (flappy bird clone) React+Mori: ???