Powering Up Ajax Apps with Dojo

By Matthew Russell
June 13, 2008 | Comments: 7

The book I've been working on for the past year, Dojo: The Definitive Guide, has finally materialized and is now available on Safari. Printed copies should be available no later than this Tuesday, June 17th -- the same day Firefox 3 gets released. In case you haven't heard of Dojo, it's an industrial strength JavaScript toolkit for creating great user experiences on the web.

Although my name might be the only one on the front cover of the book, I definitely didn't do it alone, and I did my best to be transparent about that in the preface. Everyone from old college professors to O'Reilly's (excellent) editorial staff to my new friends from the #dojo IRC channel all had a profound influence on this project in one way or another. As easy as it is to get infatuated with technology and become enveloped by all of the latest and greatest tech happenings, it's important to remember what makes it all possible: everyday people like you and me.

If you decide to pick up a copy of the book, feel free to drop me a line or find me at OSCON and let me know what you think; I sincerely hope that it serves as that documentation you've been waiting for. In the meanwhile, I'm going to try and resurrect some parts of my life that got put on hold around this time last year.

You might also be interested in:


Matt, I'm excited to read it ! - Mike

Fantastic, congrats Matthew! I'm looking forward to checking it out!

Hello Matt,

I just bought yoour book. Where can I find archived code examples in your book?


Hey David,

There were a number of changes during last minute copy editing, so I don't have a completely up-to-date copy of the code right now, but am working to sync things up as time allows. When I get that finished up, I'll post back here with a URL for that download. Hopefully, it shouldn't be too much longer.

Thanks again for your interest in the book and Dojo!

Just to follow up and close this loop -- we scraped the examples directly out of Safari, and they're now available at http://examples.oreilly.com/9780596516482/ (off of the main catalog page, just click on the 'examples' link).

As time permits, I'll try to clean them up just a bit, but in general, all of the code is there, it's easy to navigate, and it should hopefully save you some time.

Hi Matt, do you use any server-side technology in the book? If not, how can a Rails Developer maximally integrate dojo into Ruby on Rails applications?

Thanks and I look forward to hearing from you.


@sfakuyi: Dojo is (virtually) entirely on the client side, so you'll see very little mention of the server in the book as a general practice. However, it just wasn't possible to never use a server at all because some of the I/O transports, such as the iframe transport, JSONP, etc. really deserved some server side code to tie things all together satisfactorily. Come to think of it, most of the pieces that touch on server side stuff were covered in Chapter 4 (Ajax and Server Communication), but there was a little spillage elsewhere.

But getting back to your question, whenever necessary to incorporate server side technology, I used CherryPy, which is a Python based web server. Python code is so close to pseudocode, that I thought it would be really simple for people to get the gist of what was going on. Plus, running the CherryPy examples even if you don't want to understand Python is still very trivial. If you can already do amazing things in Ruby, I'm sure you'll have no trouble converting the server code to Ruby.

As far as maximally using Dojo with Rails...I've done little more than dabble with Ruby, and I'm not aware of any over-the-top projects that max Ruby and Dojo. My suggesion would be to go to #dojo IRC channel on freenode.net, and ask around a bit in there. If anyone is working on Dojo+Rails, then I'm sure you won't have trouble finding them.

One thing I will *urge* you to do, however, is make sure anything you do find uses the 1.x code base. Googling turns up some older stuff that uses the 0.4.x code base, and believe me, you really don't want to be using that code.

I hope that helps. Feel free to ping me if I can be of further assistance.

Popular Topics


Or, visit our complete archives.

Recommended for You

Got a Question?