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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
22
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
650
Deploying large scale web applications
joelcox
1
270
Other Decks in Programming
See All in Programming
ふつうのFeature Flag実践入門
irof
7
4k
AI時代のUIはどこへ行く?その2!
yusukebe
21
7.2k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.1k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
140
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
700
Creating Composable Callables in Contemporary C++
rollbear
0
140
Claspは野良GASの夢をみるか
takter00
0
190
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
270
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
100
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
550
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.3k
Vite+ Unified Toolchain for the Web
naokihaba
0
310
Featured
See All Featured
A better future with KSS
kneath
240
18k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Making Projects Easy
brettharned
120
6.7k
Facilitating Awesome Meetings
lara
57
7k
The agentic SEO stack - context over prompts
schlessera
0
820
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
WENDY [Excerpt]
tessaabrams
11
38k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
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]