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
26
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
15
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
57
CI Joe
joelcox
0
64
Shipping products in a start-up environment
joelcox
0
59
Measuring Dependency Freshness in Software Systems
joelcox
0
100
Why you should use a MV* framework
joelcox
2
620
(Really) naive data mining
joelcox
2
580
Deploying large scale web applications
joelcox
1
260
Other Decks in Programming
See All in Programming
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.2k
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
160
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
5
3.9k
最近のVS Codeで気になるニュース 2025/01
74th
1
260
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
190
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
250
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Rails アプリ地図考 Flush Cut
makicamel
1
110
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
130
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
340
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
What's in a price? How to price your products and services
michaelherold
244
12k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Documentation Writing (for coders)
carmenintech
67
4.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Gamification - CAS2011
davidbonilla
80
5.1k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Adopting Sorbet at Scale
ufuk
74
9.2k
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]