Ditching Promises and Socially Acceptable Callback Hell
summary
Argues that Promises are just structured callbacks and shows concrete migrations: wrapping navigator.geolocation in a Promise, building device-list and device-function chains against the Particle cloud API, a generator-based "steps" demo that yields fetch results, and then a shorter rewrite using async/await. Demonstrates Promise chaining, Promise.all and error handling with try/catch, notes browser support (all except Internet Explorer) and Node 7.6+, and proves the demos work while claiming async/await yields clearer, more maintainable flow.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:00Ajax Asynchronous Javascript and Xml
- 1:42Jquery Ajax
- 8:29Working with the Geolocation Api
- 13:37Who Uses Promises
- 15:40Particle Console
- 23:22Es6 Iterators and Generators
- 26:24Create Synchronous Looking Ajax Code
- 29:57Support for Async Await in all Browsers Not Named Internet Explorer
- 31:20Handle Errors
related talks
50mRedemption from Callback Hell
32mPromises Are So Passé
14mThe Promised Path to Async, Awaits
45mNext Generation Asynchronous Patterns in JavaScript
49mA Beginner's Guide to Wrangling Asynchronicity in JavaScript
42mBeyond Promises: Async Patterns in JavaScript
45mPromises — It Doesn't Have to Hurt
30mParadigms for dealing with asynchrony
