What I read

Why Angular 2/4 Is Too Little, Too Late – Chris Cordle – Medium

medium.com / 9 July 2017

TL;DR — AngularJS was a decent idea in 2012 but in 2017, the JS ecosystem has surged past Angular in maturity, flexibility, and productivity. Thanks to webpack, NPM on the front-end, and a mature ecosystem of tooling and libraries, it is quite easy to maintain a large, flexible, well-engineered SPA with React, Vue, or other lightweight JS libraries, even at enterprise companies with large teams.

In addition, Angular 2/4’s troubled 3-year development cycle and debatable architecture decisions should give any company pause before considering the adoption of this brand new framework.

In 2013, Angular and every other JS framework was pitching two-way data binding as a feature. React came along and told us that was a bad idea. Two-way data binding is great for simple applications but in production, at scale, with large amounts of state, it can easily become spaghetti. Lots of unpredictable side-effects can be triggered. Two way data-binding was a feature in 2013 and Facebook said it was a bug. It turns out they were right.

Facebook was unopinionated about state management, however. Instead, it offered “Flux” as a solution, which was more of a pattern than an actual library or framework.

We hit peak “Flux fatigue” when, on June 2, 2015, Dan Abramov released Redux. Inspired by Elm language, Redux brought predictable, functional, maintainable state management to JavaScript. Redux introduced actions and reducers that follow a pattern that shares similarities with Event Sourcing, which is a common software architecture pattern in back-end server technologies. Redux’s explicit, declarative data management model allowed for state to be managed easily and scales well with the application.

In March of 2015, Facebook announced React Native for iOS. A landmark announcement, it proved that React’s functional UI component abstraction could be leveraged to write native mobile applications for the first time. Rather than promising, “Write once, run anywhere”, which is often derided as “Write once, debug everywhere”, Facebook pitched “Learn once, write everywhere” as a philosophy. Inherent in that philosophy is that while it is possible to share a large portion of code between platforms, there are often many nuances between platforms that must be uniquely addressed. React Native provides an interface for addressing those platform differences.

The Battle Is Over: React Won.