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
Pixelpillow College Tour - Call me Maybe
Search
Joël Cox
June 17, 2021
Programming
36
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pixelpillow College Tour - Call me Maybe
More from me about
business and technology
.
Joël Cox
June 17, 2021
More Decks by Joël Cox
See All by Joël Cox
Pixelpillow College Tour - HTTP APIs
joelcox
0
24
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
66
CI Joe
joelcox
0
76
Shipping products in a start-up environment
joelcox
0
67
Measuring Dependency Freshness in Software Systems
joelcox
0
120
Why you should use a MV* framework
joelcox
2
630
(Really) naive data mining
joelcox
2
660
Deploying large scale web applications
joelcox
1
270
Other Decks in Programming
See All in Programming
React本体のコードリーディング
high_g_engineer
1
130
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
220
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
520
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
400
数百円から始めるRuby電子工作
tarosay
0
130
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.3k
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
240
継続モナドとリアクティブプログラミング
yukikurage
3
680
メールのエイリアス機能を履き違えない
isshinfunada
0
210
霧の中の代数的エフェクト
funnyycat
1
460
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
200
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
So, you think you're a good person
axbom
PRO
2
2.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Building Adaptive Systems
keathley
44
3.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
760
Why Our Code Smells
bkeepers
PRO
340
58k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
Pixelpillow College Tour Call me Maybe
Asynchroon vs. synchroon
vs.
Wait for it… • Klik of andere gebruikersinterac ti e
• Netwerk, database of ander extern verzoek • (Rela ti ef) langlopende processen • Etc. etc.
Niet alleen in JavaScript Maar wel vaak…
Plus een stukje historisch besef #hoedan
Callback hell
For the people– From the people • Slechts een best
prac ti ce [klik]
For the people– From the people • Slechts een best
prac ti ce • Error afhandeling • Complexere control fl ow [klik]
Control fl ow - Sequen ti eel
Control fl ow - Parallel
Control fl ow - Waterfall
The Promised Land
Van user land naar ES6 • Wat is een promise
nu echt?
Van user land naar ES6 • Wat is een promise
nu echt? • Een func ti e die een object returned met een then func ti e. • Een func ti e die een object returned met een catch func ti e [klik]
Alternate universe • Control fl ow - Promise.all(), Promise.any(), Promise.race(
) • Tooling - Where did my result go?
Hold my beer
🍭 • Syntax sugar! • We hebben een hele taal,
maar deze is qua DX niet heel geschikt voor async code…
Async/await • De func ti e die ik de fi
nieer is asynchroon: async • De func ti e die ik aanroep is asynchroon: awai t • Of zijn het gewoon promises? [klik]
There and back again
Waneer een promise niet genoeg is
Waneer een promise niet genoeg is • Huidige staat -
isPending, isSuccesful… • Resultaten in templates • Meerdere instan ti es
Generators to the rescue • “On-demand” resultaten • Integreert met
async/await (en dus promises) [klik]
Pitfalls
What could go wrong? • Asynchrone code inslikken • Niet
e ffi ciënte control fl ow • Dubbeling in asynchrone code
Pick your poison
Pick your poison • Al ti jd async/await boven promises
• Generators - of beter Ember Concurrency “tasks” voor UI/interac ti e
Toegi f
What if… • Ik geen idee heb wanneer wat gebeurt?
• 💡 Run loops, event emi tt ers en meer [klik]
Vragen? 038 750 3491
[email protected]