Part 2: promises

Promises are a fairly classic abstraction already, even in JS where they got formalized in 2012 with Promises/A+. Often misunderstood or under-used, they provide a solid fix to many of the pitfalls inherent to raw callbacks, and offer a wealth of extra features and goodness.

You can download all code samples for this part if you’d like to experiment on your own machine, along with all the videos for this part if you absolutely need to view them offline:
async-js-part-2-promises-code.zip 15.62 KB
async-js-part-2-promises-videos.zip 601.15 MB
Part 2: promises
Intro and reminders on callback pitfalls
3 mins
Promises: an old concept
3 mins
Promises in the JS ecosystem and their native/emulated availability
4 mins
NOT just another way to write callbacks
1 min
Terminology and principles
7 mins
Promise-based APIs
8 mins
NOT replaced by async/await
1 min
Consuming a promise with .then()
9 mins
What about exceptions?
7 mins
Creating a promise
6 mins
Parallelizing promises
7 mins
Sequencing promises
2 mins
Timeouts, cancellation and future combinators
10 mins
Dedicated ESLint rules
4 mins
“Choose your poison” API design: callbacks + promises
6 mins
Outro part 2
2 mins