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
71
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
71
Survive heisenbug in micro service architecture
mukkoo
1
72
WordFlow (WordPress WorkFlow)
mukkoo
0
60
What is git?
mukkoo
0
74
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
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
910
Re:proS_案内資料
rect
0
250
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
120
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
WEBエンジニア向けAI活用入門
sutetotanuki
0
280
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
290
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
130
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
140
gopls を改造したら開発生産性が高まった
satorunooshie
8
220
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
3
1k
Identifying User Idenity
moro
4
5.6k
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.4k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
31
1.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Facilitating Awesome Meetings
lara
49
6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.6k
Navigating Team Friction
lara
183
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Scaling GitHub
holman
458
140k
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