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
28
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
17
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
63
CI Joe
joelcox
0
70
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
610
Deploying large scale web applications
joelcox
1
260
Other Decks in Programming
See All in Programming
CSC509 Lecture 04
javiergs
PRO
0
300
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
190
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
830
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.7k
開発生産性を上げるための生成AI活用術
starfish719
3
1.1k
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
390
CSC509 Lecture 03
javiergs
PRO
0
340
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
XP, Testing and ninja testing ZOZ5
m_seki
3
670
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Automating Front-end Workflow
addyosmani
1371
200k
Raft: Consensus for Rubyists
vanstee
140
7.1k
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]