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
0
27
Pixelpillow College Tour - Call me Maybe
More from me about
business and technology
.
Joël Cox
June 17, 2021
Tweet
Share
More Decks by Joël Cox
See All by Joël Cox
Pixelpillow College Tour - HTTP APIs
joelcox
0
16
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
63
CI Joe
joelcox
0
68
Shipping products in a start-up environment
joelcox
0
60
Measuring Dependency Freshness in Software Systems
joelcox
0
110
Why you should use a MV* framework
joelcox
2
620
(Really) naive data mining
joelcox
2
600
Deploying large scale web applications
joelcox
1
260
Other Decks in Programming
See All in Programming
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
15
2k
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
10
4.3k
AWS Summit Japan 2024と2025の比較/はじめてのKiro、今あなたは岐路に立つ
satoshi256kbyte
0
120
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
24
9.6k
Porting a visionOS App to Android XR
akkeylab
0
680
CDK引数設計道場100本ノック
badmintoncryer
2
480
Model Pollution
hschwentner
1
160
効率的な開発手段として VRTを活用する
ishkawa
0
160
型で語るカタ
irof
0
700
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
1.1k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
140
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.3k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
Designing for humans not robots
tammielis
253
25k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
It's Worth the Effort
3n
185
28k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
520
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Facilitating Awesome Meetings
lara
54
6.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Rails Girls Zürich Keynote
gr2m
95
14k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
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]