I love Backbone.js. It's an amazing little library that does so much with so little. It's also unopinionatedthere are endless ways to do the same thing. This last point gives many Backbone.js programmers a headache. The freedom to implement things the way we see fit is great, until we start making those unavoidable consistency errors.
When I first started with Flux, I couldn't really see how such an architecture could help out a mere Backbone.js programmer. Eventually, I figured out two things. First, Flux is unopinionated where it mattersthe implementation specifics. Two, Flux is very much like Backbone in the spirit of minimal moving parts that do one thing well.
As I started experimenting with Flux, I realized that Flux provides the missing architectural perspective that enables scalability. Where Backbone.js and other related technologies fall apart is when something goes wrong. In fact, these bugs can be so difficult that they're never actually fixedthe whole system is scarred with workarounds.
I decided to write this book in the hope that other programmers, from all walks of JavaScript, can experience the same level of enlightenment as I have working with this wonderful technology from Facebook.
What this book covers
, What is Flux? , gives an overview of what Flux is and why it was created.
, Principles of Flux , talks about the core concepts of Flux and the essential knowledge for building a Flux architecture.
, Building a Skeleton Architecture , walks through the steps involved in building a skeleton architecture before implementing application features.
, Creating Actions , shows how action creator functions are used to feed new data into the system while describing something that just happened.
, Asynchronous Actions , goes through examples of asynchronous action creator functions and how they fit within a Flux architecture.
, Changing Flux Store State , gives many detailed explanations and examples that illustrate how Flux stores work.
, Viewing Information , gives many detailed explanations and examples that illustrate how Flux views work.
, Information Lifecycle , talks about how information in a Flux architecture enters the system and how it ultimately exits the system.
, Immutable Stores , shows how immutability is a key architectural property of software architectures, such as Flux, where data flows in one direction.
, Implementing a Dispatcher , walks through the implementation of a dispatcher component, instead of using the Facebook reference implementation.
, Alternative View Components , shows how view technologies other than React can be used within a Flux architecture.
, Leveraging Flux Libraries , gives an overview of two popular Flux librariesAlt.js and Redux.
, Testing and Performance , talks about testing components from within the context of a Flux architecture and discusses performance testing your architecture.