Posted on 23/06/2008. By Pete Otaqui.
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:
- Dojo: The Definitive Guide
- Mastering Dojo
All three books cover the core dojo library and dijit gui controls and also associated tools like the build system.
Dojo: The Definitive Guide
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 ;).
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.
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 .