You are previewing Learning Dojo.
O'Reilly logo
Learning Dojo

Book Description

A practical, comprehensive tutorial to building beautiful, scalable interactive interfaces for your Web 2.0 applications with Dijits

  • Learn real-world Dojo programming with detailed examples and analysis of source code

  • Comprehensive guide to available Dojo widgets (dijits) and how to use them

  • Extend Dojo by creating your own dijits

  • Highly practical, with hands on examples and short, clear explanations right from the start.

In Detail

Dojo is a popular AJAX-specific open-source JavaScript framework for building powerful web applications. It provides a well conceived API and set of tools to assist you and fix the issues experienced in everyday web development. Your project size is no concern while using Dojo. It is the best scalable solution to all your size-related issues.

This book starts by giving you tips and tricks for programming with JavaScript. These tricks will help you with Dojo. With every chapter, you will learn advanced JavaScript techniques. You will learn to leverage Dojo for a clean web application architecture using JSON or XML.

Learning Dojo gives in-depth as well as practical explanations of using the Dojo AJAX JavaScript Toolkit to create powerful and dynamic websites.

Table of Contents

  1. Learning Dojo
  2. Credits
  3. About the Author
  4. About the Reviewer
  5. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code for the book
      2. Errata
      3. Piracy
      4. Questions
  6. 1. Introduction to Dojo
    1. Dojo usage
    2. A sneak peek at Dojo
      1. Dynamic charting
      2. StackContainer wizard
      3. What Dojo is (and isn't)
      4. The Dojo foundation
      5. How to participate
      6. Feature overview
      7. Dojo compared to other Ajax frameworks
      8. Server-side compatibility
      9. Reference sites, API listings, forums, and mailing list
    3. Summary
  7. 2. Useful JavaScript and Dojo Tricks
    1. Array usage tips and gotchas
    2. Functions as arguments
    3. JavaScript's prototype-based OO
    4. Using closures
    5. OO in Dojo
    6. Anatomy of a Dojo page
    7. Basic Dojo functions
    8. Intermediate Dojo functions
    9. Logging, Firebug integration, and debugging
    10. Event handling in Dojo
    11. JSON
    12. Summary
  8. 3. Basic Dijit Knowledge
    1. The two ways to create Dijits
      1. How do I find my widget?
    2. What's in the fridge? A smorgasbord of tasty Dijits
    3. Dijit structure
      1. Lifecycle
      2. Templates
      3. Attach points
      4. Events
      5. Extension points
      6. Django Templating Language (DTL)
        1. Variable substitution
        2. Loops
        3. Conditionals
        4. Argument passing
        5. A recommended widget structure
    4. Themes
    5. I18N
      1. djConfig.locale
      2. Programmatic locale formatting
      3. Accessibility and graceful degradation
    6. Summary
  9. 4. Ajax Communication
    1. Dojo Ajax features
    2. The "Hello World" of Ajax
      1. Errors
      2. Posting data
      3. The content parameter
      4. Content-types
    3. Script request/JSONP (dojo.io.script)
    4. Remote procedure calls
    5. Summary
  10. 5. Forms
    1. The Form Dijit
    2. Generic properties for all Form Dijits
      1. Textfields and validation
    3. CheckBoxes, radio buttons, and toggle buttons
    4. Spinners, sliders, and FilteringSelects
    5. TimeTextBox
    6. Buttons
    7. Ajax integration
    8. Summary
  11. 6. Layout
    1. Basic Dojo layout facts
    2. ContentPane
    3. Container functions
      1. LayoutContainer
      2. SplitContainer
      3. StackContainer
      4. TabContainer
      5. AccordionContainer
      6. BorderContainer
    4. DragPane
    5. ExpandoPane
    6. FloatingPane
    7. GridContainer
    8. RadioGroup
    9. ResizeHandle
    10. RotatorContainer
    11. ScrollPane
    12. Compound example using layout
      1. The Toolbar
      2. The BorderContainer
      3. The AccordionContainer
      4. The ScrollPane
    13. One step forward — creating a widget
    14. Summary
  12. 7. Data, Trees, and Grids
    1. dojo.data and dojox.data
    2. Quick example
    3. Models
    4. Data sources, stores, and consumers
      1. dojo.data.Read
      2. dojo.data.Write
      3. dojo.data.Identity
      4. dojo.data.Notification
      5. Common functions for all APIs
    5. A simple tree example
    6. Forests and trees
      1. Tree events
      2. Tree styling
      3. Tree drag and drop
    7. Reading and writing with JsonRestStore
    8. Overview of the Grid Dijit
      1. A simple Grid
      2. Grid views
      3. Grid custom rendering
      4. Grid sorting
      5. Cell editing and styling
    9. Summary
  13. 8. Real-World Dojo
    1. Using AOL's and Google's CDN
      1. Dojo's build system and cross-domain loading
    2. Using unit testing with Dojo Objective Harness (DOH)
      1. Example 1: Site navigation scaffolding
      2. Example 2: Multi-charting application
      3. Example 3: CRUD application
    3. Summary