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
100
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
180
Bug Hunt
mukkoo
0
110
Survive heisenbug in micro service architecture
mukkoo
1
98
WordFlow (WordPress WorkFlow)
mukkoo
0
91
What is git?
mukkoo
0
110
Git a life
mukkoo
0
290
Talk sui talk
mukkoo
1
180
Road to ES6
mukkoo
1
150
Middleman
mukkoo
0
210
Other Decks in Programming
See All in Programming
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
530
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.5k
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
710
AIコーディングAgentとの向き合い方
eycjur
0
280
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
520
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
より安全で効率的な Go コードへ: Protocol Buffers Opaque API の導入
shwatanap
2
730
楽して成果を出すためのセルフリソース管理
clipnote
0
190
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
Deep Dive into Kotlin Flow
jmatsu
1
360
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
KATA
mclloyd
32
14k
It's Worth the Effort
3n
187
28k
GitHub's CSS Performance
jonrohan
1032
460k
Gamification - CAS2011
davidbonilla
81
5.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Rails Girls Zürich Keynote
gr2m
95
14k
The World Runs on Bad Software
bkeepers
PRO
70
11k
The Language of Interfaces
destraynor
161
25k
Why Our Code Smells
bkeepers
PRO
339
57k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
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