demystifying angular 2 - doag deutsche oracle ... · demystifying angular 2 philipp tarasiewicz,...
TRANSCRIPT
About MePhilipp Tarasiewicz
Consultant / Trainer / Developer
Web Dev / Distributed Systems15 yr.
Consultant & coach5 yr.
Perl / CGI » Java, PHP» JavaScript / Go
@justphilmusic
AngularJS: Eine praktische Einführung in das JS-Framework
● First German AngularJS book● dpunkt.verlag● April 2014● ca. 360 pages
http://dpunkt.de/buecher/4489/angularjs.html
Agenda
(What is Angular?)Why Angular 2 ?! Angular 2 in a Nutshell
Migration Strategies Angular 2 Progress
1 2
3 4
Angular Overview
Services
Directives
Modules
ScopesData Binding
Dependency Injection
Animation
Validation
Routing
Angular
Filters
Expressions
Controllers
Angular Overview
Services
Directives
Modules
ScopesData Binding
Dependency Injection
Animation
Validation
Routing
Angular
Filters
Expressions
Controllers
Very good testability!
Components
<my-app>
<user-list> <navigation>
<user-image> <user-info> <nav-item> <nav-item>
An app is just a tree of components!
Components
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: '<h1>My First Angular 2 App</h1>'
})
class AppComponent {}
Directives
Most Angular 1.X directives are obsolete in Angular 2.
Some exceptions:
ngRepeat » NgFor
ngClass » NgClass
Dependency Injection
Root Injector
Child Injector Child Injector
Child Injector
Child Injector
Child Injector
Child Injector
Injector Hierarchy
Change Detection
AppComp
MyComp1 MyComp2
SubComp11 SubComp12 SubComp21 SubComp22
By default change detection happenson every browser event.
Change Detection
AppComp
MyComp1 MyComp2
SubComp11 SubComp12 SubComp21 SubComp22
Massive optimizations possibleby using Observables and Immutables!
Isomorphic JavaScript
Angular Universal
Preboot
Prerender app on the server to speed up client-side app loading.
Angular 2 Cheatsheet
https://angular.io/cheatsheet
“This cheat sheet is provisionaland may change.”
Migration Strategies
A1 Preparations
angular.component()Router
ngForwardngUpgrade
A1 / A2 Interop
A1 in A2A2 in A1
Alpha Final
Fast
Simple
Productive
Available!
Your Feedback
Dev @ Google
Angular 2 Progress
Beta
Docs
P1 Issues
Alpha Final
Fast
Simple
Productive
Available!
Your Feedback
Dev @ Google
Angular 2 Progress
Beta
Docs
P1 Issues
Questions to Ask
Do I need to deliver or do I have time to experiment?
Which browsers do I need to support?
Which devices do I need to support?
Do I heavily rely on 3rd-party libraries?
Thank you!Philipp TarasiewiczConsultant / Trainer / Developer
@justphilmusic