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
18
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
13
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
49
CI Joe
joelcox
0
54
Shipping products in a start-up environment
joelcox
0
55
Measuring Dependency Freshness in Software Systems
joelcox
0
94
Why you should use a MV* framework
joelcox
2
610
(Really) naive data mining
joelcox
2
510
Deploying large scale web applications
joelcox
1
250
Other Decks in Programming
See All in Programming
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
210
Java 22 Overview
kishida
1
180
Ruby Pattern Matching
bkuhlmann
0
930
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
260
Apache Hive 4 on Treasure Data
ryukobayashi
0
330
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
710
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
VS Code をプロダクトにどう取り込むか
onomax
1
370
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
390
Featured
See All Featured
Infographics Made Easy
chrislema
238
18k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Done Done
chrislema
178
15k
What the flash - Photography Introduction
edds
64
11k
Building Adaptive Systems
keathley
31
1.9k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
Embracing the Ebb and Flow
colly
80
4.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]