on 8 October 2008
Dojo still has, however, one major drawback: the documentation is sparse at best, and completely missing in some areas. The API reference is not rich enough, and parts of the online free Dojo Book are outdated; the best option for programmers is often to skim directly through the well-commented source code and through the accurately done test suites. Dojo is a big and complex project, so it will take a while for the community to document it properly; in the meanwhile, the excellent forums, Dojo Campus and the IRC channel provide an excellent resource. Printed books also come to the rescue of programmers who want to use Dojo: being the project so interesting, there are quite a lot of titles available, and Mastering Dojo ranks among the most up-to-date and interesting ones.
Every chapter is devoted to a topic, and is made of an introduction followed by well-made examples. It doesn't provide a reference: you learn the main things, and then if you want to know all the API you'll want to find more documentation elsewhere. What it provides is however what you need if you're new to Dojo: a description of what you can do and some examples on how to do it - so that basically you understand that you'll be able to use Dojo to create a modern web application in and easy (although, as all computer programming tasks, not always straightforward) way.
Even though absolutely not a reference, Mastering Dojo can be used as such to some extent: the sections about events, DOM introspection and editing, classes and data are, for instance, enough in-depth to provide reference for most of the tasks a developer needs to perform. Others, such as the Grid and the Tree, are more like introductions to those advanced widgets, but are nevertheless very appreciated as it's not easy (if at all possible) to find coherent documentation elsewhere regarding them.
All in all, if you plan to use Dojo because to have to create a serious web application, this book is an excellent starting point, and will likely remain useful also when your knowledge of the framework has grown.
on 12 December 2008
This book is essential reading material for anyone looking to develop RIA's.
I have to say I am very impressed with Dojo. It is a very polished project with quite a huge scope:
* If you've ever used templating technologies like Freemarker or Velocity, it has elements of this built in.
* Great themes. Architecture handles browser variants elegantly in CSS. No hacks here.
* It does a complete overhaul of the event model fixing up memory leaks in Internet Explorer.
* It is the most Accessibility friendly Ajax framework I've seen.
* It handles i18n really well and subclasses textboxes so you can have things like a numeric text box. Then you can apply currency formatting. It'll maintain two versions of the field in the browser. A viewable version and one that gets sent back to server. So things like thousand seperators, decimal points and currency symbols can be inserted and then stripped out in version returned to server. Great for things like percent 50% -> 0.5 etc. Great date formatting too.
* It also enables things like using the 'Esc' key to restore old values from form fields too.
* There is a really super enhanced textbox control that allows emulation of word processor type features such as applying fonts, bold, italic, strikethrough, justification, numbered and bulleted lists.
* If has similarities to GWT, Swing or VB.NET so you can do things like use Panels and Splitters for resizable panels. You can organise the layout in containers.
* You can achieve similar effects to Rico Accordian (like the Outlook shortcuts menu) and tabbed pages and there is wizard functionality to accumulate fields over several pages and do a submit at the end.
* It has components for handling Treeviews and Datagrids (view & edit mode). For the latter, think Excel spreadsheets. You can do the equivalent of freezing panes, so only some cells scroll horizontally or vertically. So you can effectively have labels that don't disappear when you scroll the data.
* Dojo has a data module enabling you to return result sets as JSON or XML or from a web service through Data Drivers. This makes it easy to mock server-side services and quickly prototype systems for demonstration purposes.
* You can cache the whole result in the page or chunk it (think telemetry/lazy loading to handle paging).
* ResultSets can be cached in a node of the web page and bound to controls allowing on the fly sorting/filtering without the need for server roundtrips.
* The book also illustrates classic Ajax techniques like:
** Yellow Fade Effect (visual cue for form field currently in focus)
** Toaster (notifications that scroll down screen)
** Modal effect, rendering form elements behind modal form inoperative without lots of manual coding.
** Drag and Drop.
The book wraps up by putting together a framework and sample app to demonstrate how you can apply Dojo to emulate the look and feel of a native application in a web browser which tied everything together nicely.
There was one last bug bear that confused me too. P188 ">/g". What's this all about? I've made a guess and posted on Pragmatic Forum. If anyone knows correct answer, please bring me up to speed. :-)
on 26 July 2012
This book begins with the authors explaining the greatness of Dojo and how dedicated the developers are by refactoring all the code back in 2007. From what I can tell they are still just as dedicated since I have been having trouble getting the code examples to work.
An early exercise involves creating a spreadsheet-like view using dojox.grid.Grid only that dojox.grid.Grid no longer exists, but by poking around I got it to work by using dojox.grid.DataGrid instead. Next up some code gets added to run asynchronous requests that pull in search results from yahoo based on the table row clicked. This does not work either. According to Yahoo 'The service has been shut down.' After reading through the documentation on [...] I am now finding that the method for including modules used by the book has been deprecated in favor of AMD format. To be fair I have not got very far with this book yet, but I'm already getting tempted to give up on it in favor of the online docs. It's a shame because this book is actually quite well written.