Promise-Based Architecture
summary
Explains why promises beat Node-style callbacks for architecture by letting request-making functions return an object that callers attach handlers to later, shows concrete code patterns in Angular and Q, warns about the q.defer anti-pattern and how to convert node callbacks with a dnotify helper, demonstrates caching, prefetching and putting requests on hold until authentication, covers testing by returning promises to Mocha, notes q.when/q.reject, introduces ppipe composition with Ramda and mentions ES6 yield/co for unwrapping promises.
AI-written summary · about
chapters (12)
- 0:00Introduction and resources
- 0:42Why use promises?
- 3:01Promises vs callbacks
- 6:16Promises vs pub/sub
- 10:56Chaining and debugging
- 16:54The fundamental axiom
- 21:18Handling errors
- 27:16Passing the buck
- 30:39Testing promises
- 32:07Creating promises
- 35:46Best practices
- 40:33Advanced techniques








