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
A Evolução do JavaScript Assíncrono
Search
Ruan Martinelli
December 02, 2017
Technology
0
100
A Evolução do JavaScript Assíncrono
Ruan Martinelli
December 02, 2017
Tweet
Share
More Decks by Ruan Martinelli
See All by Ruan Martinelli
Mutation Testing - Backend Meetup @ STRV
ruanmartinelli
2
120
Terra: A solution for Developing WSN Applications
ruanmartinelli
0
23
Other Decks in Technology
See All in Technology
What is DRE? - Road to SRE NEXT@広島
chanyou0311
3
630
「単なる OAuth 2.0 を認証に使うと、車が通れるほどのどでかいセキュリティー・ホールができる」のか検証してみた
terara
0
380
Flutter研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
160
How to Think Like a Performance Engineer
csswizardry
4
590
DevIO2024_レガシー運用からの脱却 -クラウド活用の実践事例とベストプラクティス-
jun2882
0
210
成長期に歩みを止めないための創業期の開発文化形成
mayah
6
420
頼られるのが大好きな 皆さんへ - 支援相手との期待の合わせ方、突き放し方 -/For_people_who_like_to_be_relied_on
naitosatoshi
1
290
Azure OpenAI Service Dev Day / LLMでできる!使える!生成AIエージェント
masahiro_nishimi
3
810
20240724_cm_odyssey_hibiyatech
hiashisan
0
110
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
データ分析を支える技術 生成AI再入門
ishikawa_satoru
0
380
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
Featured
See All Featured
How to name files
jennybc
67
96k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Scaling GitHub
holman
458
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
Optimizing for Happiness
mojombo
373
69k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
34
1.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
26
1.6k
Agile that works and the tools we love
rasmusluckow
325
20k
Writing Fast Ruby
sferik
623
60k
Navigating Team Friction
lara
181
13k
Building Flexible Design Systems
yeseniaperezcruz
323
37k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
12
3.8k
Transcript
A EVOLUÇÃO DO. JAVASCRIPT ASSÍNCRONO. RUAN MARTINELLI . ruanmartinelli.com .
@ruanmartinelli .
None
“ANY APPLICATION THAT CAN BE WRITTEN IN JAVASCRIPT, WILL EVENTUALLY
BE WRITTEN IN JAVASCRIPT.” -JEFF ATWOOD, STACK OVERFLOW
# OF PULL REQUESTS octoverse.github.com
None
ECMAScript
None
None
None
1 2 3 4 1 2 3
1 2 3 4 1 2 3 4 ✔ 1
2 3 ✔ 1 2 3
1 2 3 4 1 1 2 2 3 ✔
3 4 ✔ 1 2 3
CALLBACK.
CALLBACK.
CALLBACK.
CALLBACK.
CALLBACK.
CALLBACK.
CALLBACK.
}); }); }); }); }); }); }); }); CALLBACK.
PROMISES.
None
None
None
getLivro() .then() .catch()
PROMISES.
PROMISES.
PROMISES.
PROMISES.
PROMISES.
PROMISES.
PROMISES.
None
ASYNC FUNCTIONS (async/await).
CALLBACK.
PROMISES.
ASYNC FUNCTIONS.
ASYNC FUNCTIONS.
ASYNC FUNCTIONS.
ASYNC FUNCTIONS.
- Sempre retornam uma Promise; ASYNC FUNCTIONS.
??
// true
ASYNC FUNCTIONS. - Sempre retornam uma Promise;
ASYNC FUNCTIONS. - Sempre retornam uma Promise; - Permitem o
uso do await;
None
- Sempre retornam uma Promise; - Permitem o uso do
await; ASYNC FUNCTIONS.
- Sempre retornam uma Promise; - Permitem o uso do
await; - Uso de constructs nativos; ASYNC FUNCTIONS.
None
None
- Sempre retornam uma Promise; - Permitem o uso do
await; - Uso de constructs nativos; ASYNC FUNCTIONS.
- Sempre retornam uma Promise; - Permitem o uso do
await; - Uso de constructs nativos; - Tratamento de erros com try/catch. ASYNC FUNCTIONS.
None
None
None
None
None
- Observables, RxJS; - Generators; - Promise.prototype.finally; - Bluebird; -
Promise Constructor; - Loops em Async Functions. INDO ALÉM....