Review: Learning jQuery Deferreds

Posted 28 March 2014

I’ve been lucky to have been asked to speak twice about promises and deferreds in jQuery at two conferences in the past year (NCDevCon and jQuery San Diego). Just before I was to give my talk at jQuery San Diego, the authors of Learning jQuery Deferreds, Terry Jones and Nicholas Tollervey, got in touch with me to see if I’d like a copy of their book. The book had been published just before the conference, so the timing was great.

Don’t let the smallish number of pages fool you: the book is a powerhouse at getting to the heart of using promises and deferreds in all of your JavaScript (and jQuery in particular) work.

The authors start off with a fairly quick look at what a promise is and what a deferred is, and then spend the majority of the book demonstrating how to effectively and properly use deferreds in action. What I loved about the book is that the majority of the content of the book is examples: real, sometimes complex, examples that can be applied to your everyday work in building JavaScript applications. Even better, they provide challenges for each example so that you can take what you’ve learned and build upon it in a structured way. While they don’t provide full solutions for every challenge, there are hints and guides in an appendix to help you on your way.

I also truly appreciated the fact that when an example was given, the authors didn’t build off an example from two chapters ago and didn’t require you to remember a bunch of previous examples in order to understand the code being demonstrated. It’s one of my pet peeves with many software development books that the authors show code in chapter 3 and then expect you to remember the logic and implementation details of that code when referenced in another example in chapter 17. Thankfully, all of the author’s examples are concise, relevant, and self-contained.

As I mentioned, I’ve spoken about promises and deferreds before, but Terry and Nicholas have a depth of practice using deferreds that vastly outstrips my own. Even if you’re not using jQuery in your Web application building, the book is an awesome guide to mastering deferreds in JavaScript.

The O’Reilly team has been generous enough to offer a promo code for the book. If you use the code AUTHD on, you’ll get 40% off the print book and 50% off the ebook!

Categories: JavaScript Books