Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Pixelpillow College Tour - Call me Maybe
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Joël Cox
June 17, 2021
Programming
40
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
Transcript
30 slides
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]
More Decks by Joël Cox
See All by Joël Cox
Pixelpillow College Tour - HTTP APIs
joelcox
0
31
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
71
CI Joe
joelcox
0
82
Shipping products in a start-up environment
joelcox
0
74
Measuring Dependency Freshness in Software Systems
joelcox
0
130
Why you should use a MV* framework
joelcox
2
640
(Really) naive data mining
joelcox
2
670
Deploying large scale web applications
joelcox
1
280
Other Decks in Programming
See All in Programming
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
SODA - FACT BOOK(JP)
sodainc
1
40k
Performance Optimization With LLMs
xleitix
0
260
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
4.4k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
250
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.9k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
110
Featured
See All Featured
Believing is Seeing
oripsolob
1
280
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Navigating Weather and Climate Data
rabernat
0
590
We Are The Robots
honzajavorek
0
440
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Side Projects
sachag
456
43k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
A better future with KSS
kneath
240
18k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330