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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Filippo Gangi Dino
October 27, 2016
Programming
0
110
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
190
Bug Hunt
mukkoo
0
120
Survive heisenbug in micro service architecture
mukkoo
1
110
WordFlow (WordPress WorkFlow)
mukkoo
0
95
What is git?
mukkoo
0
110
Git a life
mukkoo
0
310
Talk sui talk
mukkoo
1
190
Road to ES6
mukkoo
1
160
Middleman
mukkoo
0
220
Other Decks in Programming
See All in Programming
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
440
CSC307 Lecture 05
javiergs
PRO
0
490
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
CSC307 Lecture 02
javiergs
PRO
1
770
CSC307 Lecture 03
javiergs
PRO
1
490
CSC307 Lecture 08
javiergs
PRO
0
660
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
230
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
410
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
230
Architectural Extensions
denyspoltorak
0
270
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.4k
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
ラッコキーワード サービス紹介資料
rakko
1
2.2M
A Tale of Four Properties
chriscoyier
162
24k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Mind Mapping
helmedeiros
PRO
0
75
Code Review Best Practice
trishagee
74
20k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
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