angular with flux pattern

angular with flux pattern

download (1)the idea: a care dont care directive demo
link to github code in progress

The point of this excersize was to see if react’s flux design pattern could be used in an angular1 app – why?

– To future proof angular1 work, which will not be compatible with angular 2 but will use the flux pattern, and therefore, code will be more portable

– to improve angular1 performance by using jit notification ( what they mean by one way data flow ) rather than polling to update the ui.

Following the approach described in :

How can React and Flux help us create better Angular applications

only takes us so far –  copying the flux architecture, incorporating, dispatcher, actionCreator and Store.  But angular data binding is still used in the end.

– the virtual dom, is the reason to use react. Updating the dom is the most expensive thing a web app can do on the client.  Its a well known best practice to complete dom manipulation on an element while its not attached to the dom, and then attach it, requiring only single call to repaint instead of one for each property or child update , as would be needed if performed while the element is part of the dom.     React has turned this best practice into an api.

Faster AngularJS Rendering (AngularJS and ReactJS)

Proposes to use the React framework itself, inside an angular app.

In defense of Angular

The quality of the test is the question.  If you only manipulate one value – there’s going to be less performance benefit, than if you attempt to do more – as in a repeating list.