GETTING READY FOR ANGULAR 2 Yuri Takhteyev CTO, Rangle.io Some rights reserved - Creative Commons 2.0 by-sa What’s Angular 2, Anyway? What is Angular 2? A new front end framework inspired by Angular 1.x • And by other things also • Now in “alpha” • Image by mtaphotos The Context Angular 1.x and it’s challenges • Components: Web components, React JS • Reactive programming: ReactJS, Flux, FRP • ES6 Classes + annotations • Strong typing: TypeScript, Flow • ES6 modules • The View and the Event System What Angular 1.x Gave Us A view synchronization system • Modules with DI • Utilities • Angular 1’s View Synchronization Declarative • Separation between templates and code • Two-way data binding • Stateful • Using nested $scopes • Alternative: Components ReactJS • Web components • Doable with “controller as” and isolated directives • Business logic goes into services • Alternative: Unidirectional Flow ReactJS: better performance, procedural, merges HTML and • code Flux: easier to reason about complex data flow • Key idea: events instead of state • Perhaps even better: FRP • What Angular 2 Promises Still very declarative • 3 types of directives: components, decorators, templates • Support for unidirectional data flow • Three models: stateful, reactive, immutable • Componentized: no more $digest cycle • Controllers folded into components •
Description: