Dojo Programming
Dojo is a completely open source JavaScript toolkit primarily designed for web programming. Its
current release level is 1.9 (as of 2013-11). The source code is freely accessible and has a broad
community of support. IBM has chosen Dojo as one of the key programming interfaces supported
by Worklight and other IBM products. IBM contributes heavily to the existence and support of
Dojo.
Dojo is split into three primary packages. These are "dojo" which contain the primary JavaScript
functions, "dijit" which contain the core UI widgets and finally "dojox" which provides extensions
to the core functions otherwise found in "dojo" and "dijit".
See also:
• DeveloperWork - Build an Ajax application with the Dojo Toolkit – 2011-03-01
Dojo Information Sources
The Dojo source is available for download here:
http://download.dojotoolkit.org/
It can be downloaded as a 45 Mbyte ZIP file. It is not a bad idea to create an Eclipse simple project
and import the source into that project. Although we will never build it, it can make a very useful
reference to answer deep questions if it ever comes to that.
Off-line documentation
Dojo has historically had poor documentation for relatively new users. This is unfortunate. To
make matters worse, the documentation that is available appears to be primarily able to be viewed
on-line. The formal Dojo documentation is broken into two primary parts. One is a Programmers
Reference which is a guide to using most of the Dojo packages. The second is a detailed API
reference that is generated from the source code of the Dojo packages themselves.
Building the API Reference Documentation
The API reference documentation can be accessed on-line on the Internet very easily but I find there
are times when I would like a local copy, especially when on a plane. The following is the recipe
for downloading building a local copy. The recipe requires copies of both "Node.js" and the Dojo
specific "dapi" tool for viewing. In addition a final tool is needed to parse the source code to
generate the data for "dapi".
http://www.sitepen.com/blog/2013/01/18/generating-and-viewing-custom-api-docs/
https://github.com/lbod/dapi/wiki
1. Download the GIT package for windows from here http://git-scm.com/
2. Install the GIT package on Windows. The version used in this example was 1.8.4 but it is
expected that any version will do.
3. Download the Dojo source ZIP from here http://dojotoolkit.org/download/
4. Extract the zip into a folder.
5. Download the node app from http://nodejs.org/
6. Download the dapi package. The following command can be used:
git clone --recursive https://github.com/lbod/dapi.git
Page 136
Comentários a estes Manuais