PacktLib: Learning Dojo

Learning Dojo

Credits

About the Author

About the Reviewer

Preface

Introduction to Dojo

Dojo usage

A sneak peek at Dojo

Summary

Useful JavaScript and Dojo Tricks

Array usage tips and gotchas

Functions as arguments

JavaScript's prototype-based OO

Using closures

OO in Dojo

Anatomy of a Dojo page

Basic Dojo functions

Intermediate Dojo functions

Logging, Firebug integration, and debugging

Event handling in Dojo

JSON

Summary

Basic Dijit Knowledge

The two ways to create Dijits

What's in the fridge? A smorgasbord of tasty Dijits

Dijit structure

Themes

I18N

Summary

Ajax Communication

Dojo Ajax features

The "Hello World" of Ajax

Script request/JSONP (dojo.io.script)

Remote procedure calls

Summary

Forms

The Form Dijit

Generic properties for all Form Dijits

CheckBoxes, radio buttons, and toggle buttons

Spinners, sliders, and FilteringSelects

TimeTextBox

Buttons

Ajax integration

Summary

Layout

Basic Dojo layout facts

ContentPane

Container functions

DragPane

ExpandoPane

FloatingPane

GridContainer

RadioGroup

ResizeHandle

RotatorContainer

ScrollPane

Compound example using layout

One step forward — creating a widget

Summary

Data, Trees, and Grids

dojo.data and dojox.data

Quick example

Models

Data sources, stores, and consumers

A simple tree example

Forests and trees

Reading and writing with JsonRestStore

Overview of the Grid Dijit

Summary

Real-World Dojo

Using AOL's and Google's CDN

Using unit testing with Dojo Objective Harness (DOH)

Summary