Search -
Learning jQuery Deferreds: Taming Callback Hell with Deferreds and Promises
Learning jQuery Deferreds Taming Callback Hell with Deferreds and Promises Author:Terry Jones, Nicholas H. Tollervey A spectre is haunting Javascript -- the spectre of asynchronous callback hell. Deferreds (sometimes known as promises) are an elegant way to deal with such terrors. What many programmers don't realize is that deferreds are already built in to the ubiquitous jQuery library. They work on both the client (of course!) and on the server (for the Nod... more »e folks). Callbacks are added to deferred objects that represent outstanding asynchronous calls. When the result of an asynchronous task becomes known, the callbacks are run.
This book is a software gymnasium to lead you to callback Elysium. It's a fun way to learn to adopt and discern new tricks that will engage your cranium. Javascript developers of all platforms, defer! You have nothing to lose but nested asynchronous callback hell.« less