Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.

Quantity: 

or
Sign in to turn on 1-Click ordering.
 
   
Tell a Friend
Dojo: The Definitive Guide
 
See larger image
 
Are You an Author or Publisher?
Find out how to publish your own Kindle Books
 
  
Dojo: The Definitive Guide (Paperback)
by Matthew A. Russell (Author)
List Price: $39.99
Price: $26.39 & this item ships for FREE with Super Saver Shipping. Details
You Save: $13.60 (34%)
Special Offers Available
Pre-order Price Guarantee. Details
This title has not yet been released.
You may pre-order it now and we will deliver it to you when it arrives.
Ships from and sold by Amazon.com. Gift-wrap available.

Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Special Offers and Product Promotions

Best Value

Buy Dojo: The Definitive Guide and get Web 2.0 Patterns: What entrepreneurs and information architects need to know at an additional 5% off Amazon.com's everyday low price.

Dojo: The Definitive Guide Web 2.0 Patterns: What entrepreneurs and  information architects need to know Buy Together Today: $48.33


Customers Who Bought This Item Also Bought

Mastering Dojo: JavaScript and Ajax Tools for Great Web Experiences

Mastering Dojo: JavaScript and Ajax Tools for Great Web Experiences by Craig Riecke

$25.71
Dojo: Using the Dojo JavaScript Library to Build Ajax Applications (Developer's Library)

Dojo: Using the Dojo JavaScript Library to Build Ajax Applications (Developer's Library) by James E. Harmon

$26.39
JavaScript: The Good Parts

JavaScript: The Good Parts by Douglas Crockford

5.0 out of 5 stars (1)  $19.79
Ajax: The Definitive Guide

Ajax: The Definitive Guide by Anthony T. Holdener III

4.2 out of 5 stars (4)  $31.49
RESTful Web Services

RESTful Web Services by Leonard Richardson

4.5 out of 5 stars (28)  $26.39
Explore similar items : Books (43) Movies & TV (2) Electronics (2)

Editorial Reviews
Product Description
Of all the Ajax-specific frameworks that have popped up in recent years, one clearly stands out as the industrial strength solution. Dojo is not just another JavaScript toolkit -- it's the JavaScript toolkit -- and Dojo: The Definitive Guide demonstrates how to tame Dojo's extensive library of utilities so that you can build rich and responsive web applications like never before.

Dojo provides an end-to-end solution for development in the browser, including everything from the core JavaScript library and turnkey widgets to build tools and a testing framework. Its vibrant open source community keeps adding to Dojo's arsenal, and this book provides an ideal companion to Dojo's official documentation.

Dojo: the Definitive Guide gives you the most thorough overview of this toolkit available, showing you everything from how to create complex layouts and form controls closely resembling those found in the most advanced desktop applications with stock widgets, to advanced JavaScript idioms to AJAX and advanced communication transports. With this definitive reference you get: If you're a DHTML-toting web developer, you need to read this book -- whether you're a one-person operation or part of an organization employing scores of developers. Dojo packs the standard JavaScript library you've always wanted, and Dojo: The Definitive Guide helps you transform your ideas into working applications quickly by leveraging design concepts you already know.

About the Author
Matthew A. Russell is a computer scientist who currently lives in Franklin, TN. Hacking and writing are two activities essential to his renaissance man regimen.

Product Details

Matthew A. Russell "ptwobrussell"'s latest blog posts
       
 
Matthew A. Russell "ptwobrussell" sent the following posts to customers who purchased Dojo: The Definitive Guide
 
10:12 PM PDT, May 14, 2008

On a recent consulting gig, a client had the requirement that a JavaScript deliverable needed to run in a self-enclosed script tag that would be arbitrarily placed within the body of a page. In other words, I needed to deliver a JavaScript file such that the following code snippet would work:

<!-- somewhere in the page... --> <div id="specialContainer"> <script type="text/javascript" src="http://pipes.yahoo.com/pipes/foo.js"></script > </div> <!-- ... -->

So, in the end, it’s a pretty routine chore. A special container needs to exist at an arbitrary place in the page, the self-enclosed script tag will do some DOM building within it, and all of the magic happens therein. Well, hopefully, it goes without saying that I wanted to streamline the time it took me to complete this task with the help of Dojo.

Fortunately, version 1.1 added a new parameter you can pass into djConfig called afterOnLoad that allows you to safely inject Dojo into the page after onload hooks have occurred. In case you missed it, this feature was mentioned in the Dojo 1.1 release notes.

Here’s a snippet from how the aforementioned foo.js file that appears in the script tag might look:

//protect our handiwork within the scope of an anonymous function... (function() { //load Dojo (after the page's onload event has already occurred) djConfig = {afterOnLoad : true, require:['dojo.date','dojo.cookie']}; var e = document.createElement("script"); e.type = "text/javascript"; e. src= "http://o.aolcdn.com/dojo/1.1/dojo/dojo.xd.js"; document.getElementsByTagName("head")[0].appendChi ld(e); /* Whenever Dojo has loaded, go about your business. */ })()

In a nutshell, you define djConfig, and then append a script tag into the head of the page that will load Dojo from AOL’s CDN. In this particular case, the dojo.date and dojo.cookie would be automatically loaded as well. The tricky part is in regards to the “Whenever Dojo has loaded…” comment: as of version 1.1 there isn’t a built-in way of determining when Dojo has actually loaded, and since the script tag that loads Dojo is asynchronous, you can’t necessarily use anything in the dojo.* namespace until whenever it is finally available. In other words, you don’t have the safety or convenience of a dojo.addOnLoad block in this case, so when should you actually start using stuff inside of the dojo.* namespace?

Well — let not your heart be troubled; until version 1.2 is released that introduces the ability to provide an afterOnLoad parameter directly to djConfig, you might get by with this simple hack as a stop gap:

/* Right after you have appended the script tag into the head of the page... */ /* Check every second to see if it's safe to kick things off... */ var _interval = setInterval(function() { if (window.dojo !== undefined) { // && window.dojo.date !== undefined && ... clearInterval(_interval); /* Whatever it is you're actually setting out to do... */ } }, 1000);

By the way, all it took was a ping to JavaScript hacker extraordinaire James Burke to get the addOnLoad featured added to version 1.2 so that everything will work a little more conventionally. (Sweet!)

You may not have realized it, but the intent of this column was multipurpose. Yes, I wanted to show you how you could use Dojo as part of a self-enclosed script tag after page load, which is useful for employing Dojo as part of an application that might appear on a social networking site or a bookmarklet, but I also wanted to illustrate at least two other things: 1) While Dojo may not drop a turn-key solution right into your lap 100% of the time, JavaScript’s incredible dynamism and some ingenuity can still usually get you to where you need to go in short order, and 2) all it might take is a filing a ticket on Trac or asking someone in #dojo (IRC over at freenode.net) for help to get that turnkey solution you may be looking for delivered in the next dot release if it’s a good feature. You’ll hear me say time and time again that Dojo’s community is second to none.

If you find yourself in need of a good desktop reference on Dojo, please checkout my upcoming book, Dojo: The Definitive Guide. I’m completing the final edits this week, and it’ll be off to the printers soon thereafter.

Last but not least — if you’re going to OSCON, you might also register for my session entitled Web Graphics & Animations Without Flash (Or gfx Deliciousness with Dojo) or otherwise drop me a line if you want to get together and chat at some point during the week. The chances are pretty good that I’ll be shifting gears in the coming weeks and run a few columns on the dojox.gfx module as I prep my slides.

 
Comment    

7:17 PM PDT, May 12, 2008, updated at 6:41 AM PDT, May 13, 2008
Ladies and Gentlemen -

Part 7 of the continuing saga is now available.

You might also use the Dojo Goodness Yahoo! Pipe to stay on track if you find this column enjoyable.

As always, thanks for your support and feedback as I put the finishing touches on this book!
Comment    

6:39 PM PDT, April 23, 2008
The latest installment demonstrates Dojo's powerful grid handling a million records.
Comment    

 

What Do Customers Ultimately Buy After Viewing This Item?

Dojo: The Definitive Guide
65% buy the item featured on this page:
Dojo: The Definitive Guide
$26.39
Ajax: The Definitive Guide
12% buy
Ajax: The Definitive Guide 4.2 out of 5 stars (4)
$31.49
JavaScript: The Good Parts
11% buy
JavaScript: The Good Parts 5.0 out of 5 stars (1)
$19.79
JavaScript Definitive Guide
6% buy
JavaScript Definitive Guide