Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Around Angular2
Search
Filippo Gangi Dino
October 27, 2016
Programming
0
73
Around Angular2
A talk about the features around Angular2 stack.
Filippo Gangi Dino
October 27, 2016
Tweet
Share
More Decks by Filippo Gangi Dino
See All by Filippo Gangi Dino
talk_sui_talk_WP_Meetup.pdf
mukkoo
0
150
Bug Hunt
mukkoo
0
75
Survive heisenbug in micro service architecture
mukkoo
1
74
WordFlow (WordPress WorkFlow)
mukkoo
0
64
What is git?
mukkoo
0
80
Git a life
mukkoo
0
240
Talk sui talk
mukkoo
1
150
Road to ES6
mukkoo
1
120
Middleman
mukkoo
0
180
Other Decks in Programming
See All in Programming
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Realtime API 入門
riofujimon
0
150
Click-free releases & the making of a CLI app
oheyadam
2
120
Jakarta EE meets AI
ivargrimstad
0
620
subpath importsで始めるモック生活
10tera
0
320
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
受け取る人から提供する人になるということ
little_rubyist
0
250
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
200
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Amazon Qを使ってIaCを触ろう!
maruto
0
420
Featured
See All Featured
The Language of Interfaces
destraynor
154
24k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Become a Pro
speakerdeck
PRO
25
5k
Side Projects
sachag
452
42k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Being A Developer After 40
akosma
87
590k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Documentation Writing (for coders)
carmenintech
65
4.4k
Fireside Chat
paigeccino
34
3k
Building Your Own Lightsaber
phodgson
103
6.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Transcript
AROUND ANGULAR 2 the hard way
@MUKKOO
None
None
None
STARTING WITH NG2
WHAT WE NEED TO LEARN
REDUX WEBPACK NODEJS IMMUTABLEJS TESTING STACK
ES6 & TYPESCRIPT RXJS ZONEJS ANGULAR 2
ES6 AND TYPESCRIPT
TS IS A ES6 SUPERSET
ES6 ES5 TS
ES6 CLASSES export class Hero { id: number; name: string;
}
ES6 TEMPLATE STRINGS template: ` <h1>${title}</h1> <h2>{{hero.name}}</h2> `
ES6 ARROW FUNCTIONS heroes => { this.heroes = heroes }
TS TYPE INFORMATIONS add(a: number, b?: number) => { return
a + b; } let list: number[] = [1,2,3]; let isDone: boolean = false;
TS CLASSES CAN BE TYPES class Bar { bar: Foo
} let bar = new Bar(new Foo()) // valid let bar = new Bar(new Baz()) // error
TS INTERFACES interface Person { firstName: string[]; lastName: string; }
let mat_gan:Person = { firstName: ['Mohandas', 'Karamchand'], lastName: 'Gandhi' }
TS DECORATORS @Component({ selector: 'hero', templateUrl: 'hero.component.html', }) export class
HeroComponent { … }
ES6 AND TYPESCRIPT recap
CLASSES TEMPLATE STRINGS TYPES DECORATORS
RXJS AKA OBSERVABLE
OBSERVABLE ARE THE NEW PROMISES
ASYNCHRONOUS DATA STREAMS
THIS IS REACTIVE PROGRAMMING
MANAGE DATA STREAM
this.http.get(url) .retryWhen(err => err.delay(500)) .timeout(2000, new Error(‘…’)) .map( data =>
{ return data.json(); }) .catch(this.handleError);
RXJS AKA OBSERVABLE recap
REACTIVE PROGRAMMING
ZONEJS
IT’S AN EXECUTION CONTEXT
ASYNC JAVASCRIPT // code a(); setTimeout(b, 0); setTimeout(c, 0); d();
// run order // queue a b c d
TIMING // code start(); a(); setTimeout(b, 0); setTimeout(c, 0); d();
stop(); // start a d // stop b // missed! c // missed!
CONTEXT zone.run(function() { a(); setTimeout(b, 0); setTimeout(c, 0); d(); });
ASYNC TASKS IN THE SAME ZONE
TRANSITIVE function first() { setTimeout(second, 0); } function second() {
setTimeout(third, 0); } function third() { … } zone.run(first);
PATCH CODE AT RIGHT TIME
DEBUG
PROFILING
ZONEJS recap
EXECUTION CONTEXT FOR ASYNC TASKS
ANGULAR IS HARD
ANGULAR IS HUGE
THERE IS A LOT OF INTERESTING THINGS
None
Q&A @MUKKOO