small medium large xlarge

Mastering Dojo: JavaScript and Ajax Tools for Great Web Experiences


Cover image for Mastering Dojo

Mastering Dojo

JavaScript and Ajax Tools for Great Web Experiences


Imagine a true thin-client web application environment, with no browser incompatibilities, no plugins, and an interface that’s closer to a desktop app. You can have it all, today. Welcome to The Dojo Toolkit.

Mastering Dojo walks you through the whole range of modern web programming problems, from bringing simple web pages to life with widgets and animation, to designing and building an enterprise-class, single-page Rich Internet Application (RIA).

Are your web pages becoming more and more complex, with hundreds of lines of sprawling JavaScript as clients demand modern Ajax designs? Or maybe you’re about to enter the new world of single-page, Rich Internet Applications? Dojo is the unified toolkit that you need to get the job done.

VERSIONS: Applicable for Dojo Versions 1.1 to 1.7. Versions 1.2 onward contain additional widgets, experimental api’s and bugfixes. Please see the Dojorelease notes for detailed information.

About this Title

Pages: 568
Published: 2008-06-01
Release: P2.0 (2010-01-25)
ISBN: 978-1-93435-611-1

The last couple of years have seen big changes in server-side web programming. Now it’s the client’s turn; Dojo is the toolkit to make it happen and Mastering Dojo shows you how.

Dojo is a set of client-side JavaScript tools that help you build better web applications. Dojo blurs the line between local, native applications and browser-based applications; the browser becomes the user interface platform. “Modern” browsers provide an incomplete, inconvenient, and incompatible programming environment, but Dojo eliminates these problems. While there are many JavaScript libraries available, most focus on just one thing (for example, effects libraries, perceived JavaScript omissions, or HTML widgets). Dojo addresses all of these functional areas—and many others—extensively.

In Mastering Dojo, you’ll get the whole story, from basic usage to advanced idioms. Mastering Dojo starts out with a fast moving tutorial that will give you techniques that you can start using right away. You’ll learn all about Dojo Core—the foundation on which all things Dojo stand. See how you can modularize your project for development and automatically package your release for optimal download performance. You’ll also learn how Dojo:

  • augments the core JavaScript library
  • fixes the event system
  • simplifies DOM programming
  • provides a complete class definition facility
  • includes a powerful remote scripting (XHR) framework
  • ... and much more.

You’ll love using Dojo’s HTML user interface control widget system, Dijit. See how to use over 40 widgets, including the rich yet easy-to-use tree and grid controls.

Finally, you’ll get an in-depth look at how to design and build a single-page, rich Internet Application (RIA).

Read the reviews .

Contents & Extracts

Full table of contents

  • Introduction
  • Ajax: The Dojo Way
    • Powerful Web Forms Made Easy
    • Connecting to Outside Services excerpt
  • The Dojo APIs
    • Dojo in Depth
    • JavaScript Language Extensions
    • Asynchronous Programming
    • DOM Utilities excerpt
    • Remote Scripting with XHR, script, and iFrame
    • Defining Classes with dojo.declare
    • The Dojo Loader and Build System
  • Advanced Dijit
    • Scripting Widgets
    • Tree
    • Grid
    • Form Controls
    • Dijit Themes, Design, and Layout
    • Creating and Extending Widget Classes
  • Rich Internet Applications
    • Building a Rich Internet Application
    • Adding Dynamic Content to an RIA
    • Going Forward
  • Appendixes


Craig Riecke is a Dojo committer and a writer and editor for the Book of Dojo, Dojo’s online documentation. He is currently Manager of Application Development for CXtec in Syracuse, NY. While programming he listens to old, scratchy blues music on his iPod. His motto is “I’d rather drink muddy water and sleep in a hollow log than write a redundant line of code.”

Rawld Gill has served as chief architect of five major lines of commercial, enterprise-class software targeted at the pharmaceutical industry over the last 25 years. He co-invented the concept of distributed data collection for clinical trials. A former U.S. Air Force officer and instructor fighter pilot, he has logged more than 2000 hours in supersonic jet fighter aircraft.

Alex Russell is the project lead for The Dojo Toolkit and president of the Dojo Foundation.