Angular is heading for FRP (Functional Reactive Programming)
What is FRP?
The idea behind FRP is to have a reactive application. Technically, it means programming with asynchronous data streams. It’s also programming in a functional way, by using pure functions, avoiding side effects, which remains one of the biggest issues in web application today.
Heading towards FRP, Angular 2 relies on RxJS library. It allows users to manipulate observable data streams thanks to a toolbox full of functional operators. This library leans on the Observer pattern. Its goal is to build a dependence between an observer and an observable, in order to notify the observer each time the observable is modified, so it can update its state.
Angular 2.0 uses TypeScript
Angular 2.0 has its own CLI
In the first Angular version, the change detection process is called dirty-checking. It works with the digest cycle. During each digest cycle, Angular assesses all the recorded watches. If the value sent back by the watch has changed, the match function goes off. The aim is to ensure a consistency in the synchronisation between model and view. However, there was no guarantee to have a parent node checked before its child.
With Angular 2, the mechanism is simplified. A change does not spread in a unidirectional way, from the root. In other words, during a modification on the model, the parent component is always checked before its children.
How to migrate from Angular 1.x to Angular 2?
For a weighty application, a total migration is not possible. In that case, you should use ng-upgrade. The idea is that Angular 2 and Angular 1 coexist in the same application. Thanks to this approach, it is possible to upgrade components from Angular 1.x to Angular 2, but also to downgrade components from Angular 2 to make them work with Angular 1.x. Thus, you can progressively migrate. The perfect applicants to start a migration to Angular 2 are services with no dependencies. Then you can tackle leaf components, before converting root components.