Book Image

Learning Dojo

By : Peter Svensson
Book Image

Learning Dojo

By: Peter Svensson

Overview of this book

<p>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.<br /> <br />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.</p>
Table of Contents (13 chapters)
Learning Dojo
Credits
About the Author
About the Reviewer
Preface
Free Chapter
1
Introduction to Dojo

Compound example using layout


The following is a more complicated example which is a small information box for a fictitious adventure game. A lot of information is to be displayed in a small area:

  • Adventurer status

  • Characteristics

  • Inventory

  • Quests

Using the BorderLayout container for overall layout, it consists of three parts: a toolbar, an accordioncontainer, and a horizontal ScrollPane top display the inventory.

The toolbar is not particularly active in the example, but shows how to use a simple toolbar menu in conjunction with a BorderLayout container.

The source code for the example is here:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd">
<html>
<head>
<title>Chapter 6 Layout Example</title>
<style>
@import "dojo-1.1.0/dojo/resources/dojo.css";
@import "dojo-1.1.0/dijit/tests/css/dijitTests.css";
@import "dojo-1.1.0/dijit/themes/tundra/tundra.css";
@import "dojo-1.1.0/dojox/widget/Rating/Rating.css";
&lt...