Otaqui.com Blog

Dojo Toolkit Book Reviews – ‘Dojo: The Definitive Guide’, ‘Mastering Dojo’ and ‘Dojo: Using The Dojo Javascript Library To Build Ajax Applications’

Having been working extensively with the Dojo Toolkit, and found their documentation to be extremely useful – but not exhaustive. I was happy therefore to be able to get hold of the following of pre-release books about the toolkit:

All three books cover the core dojo library and dijit gui controls and also associated tools like the build system.

Dojo: The Definitive Guide

Dojo: The Definitive Guide

If I ever want to get a book on a subject and there is an O’Reilly Definitive Guide, I will choose that one – mostly based on having the Javascript and Actionscript equivalents. I have to say though that I felt a bit let down with this version, as DTDG isn’t as comprehensive as I’m used to from the series. While the coverage is broad (more so than the other books in this review), it isn’t all that deep in some key areas – missing out on some of the gotcha’s that I have found indispensable when working with Dojo.

I should make it clear that book is very clearly written with clean and helpful examples. It is also written with the clear intention of readers people build solid web applications beyond using Dojo.

DTDG does go into excellent detail about the Dojo environment – bootstrapping, the build system, the dijit life-cycle, browser utilities, OOP with Dojo, Event management and the Publish / Subscribe mechanism, Ajax / JSON / JSONP / JSON-RPC, and more besides. I think few people who aren’t Dojo committers could read and grok the book without gaining considerable insight.

This puts the book in context – it isn’t really for the average developer who wants to get an application up-and-running with Dojo. I would say it is for someone who wants a deeper understanding of the structure of the library, rather than how to hack something together with it. A good example is the explanation of dojo.byId(), a clear detailing of the vagaries of document.getElementById() – and why the former is more useful (however I’ll leave you to go and buy the book to find out the specifics ;).

Mastering Dojo

Mastering Dojo

I would recommend this book without hesitation. I found it informative, helpful and really on-point while trying to create a fairly heavy application on top of Dojo. Written in the usual Pragmatic Programmer style, it is as easy to read through a chapter as it is to dig into for a specific answer.

Perhaps one omission is the DOH (which the book incorrectly refers to as the Dojo Object Handler) – perhaps correctly citing the fact that it is out of it’s own scope. Given that DOH is dojo agnostic (your project does need to use Dojo to be tested with DOH) I suppose that is fair enough, but I would love to have seen even an introductory chapter on it.

Mastering Dojo is structured in a slightly confusing way – confusing at least if you are used to The Book Of Dojo and it’s well worth searching for terms in the index (unless you’re reading a PDF!) when the chapter titles don’t look as though they contain what you need.

Dojo: Using the Dojo JavaScript Library to Build AJAX Applications

Dojo: Using the Dojo JavaScript Library to Build AJAX Applications

I’m afraid to say that I wasn’t especially enamored of this book – from its tongue-tangling and strangely-chosen title onwards. I felt that it missed a considerable amount about the basics of dojo – which is understandable given its title – without really giving enough detail or insight into building an RIA – which is not.

Using Dojo (the best shortening I can come up with) does give a reasonable introduction to dojo, and covers some of the fundamental forms of usage, but it really isn’t comparable to either of the previously covered titles.

Update 2008-07-03 : Alex Russell, one of the core dojo committers has also reviewed these books .