root / branches / dot_experiment / README

Revision 6637, 6.1 kB (checked in by peller, 21 months ago)

fix brain-dead change to svn path

  • Property svn:eol-style set to native
Line 
1The Dojo Toolkit
2----------------
3
4Dojo is a portable JavaScript toolkit for web application developers and
5JavaScript professionals. Dojo solves real-world problems by providing powerful
6abstractions and solid, tested implementations.
7
8Getting Started
9---------------
10
11To use Dojo in your application, download one of the pre-built editions from the
12Dojo website, http://dojotoolkit.org. Once you have downloaded the file you will
13need to unzip the archive in your website root. At a minimum, you will need to
14extract:
15
16    src/ (folder)
17    dojo.js
18    iframe_history.html
19
20To begin using dojo, include dojo in your pages by using:
21
22    <script type="text/javascript" src="/path/to/dojo.js"></script>
23
24Depending on the edition that you have downloaded, this base dojo.js file may or
25may not include the modules you wish to use in your application. The files which
26have been "baked in" to the dojo.js that is part of your distribution are listed
27in the file build.txt that is part of the top-level directory that is created
28when you unpack the archive. To ensure modules you wish to use are available,
29use dojo.require() to request them. A very rich application might include:
30
31    <script type="text/javascript" src="/path/to/dojo.js"></script>
32    <script type="text/javascript">
33        dojo.require("dojo.event.*");       // sophisticated AOP event handling
34        dojo.require("dojo.io.*");          // for Ajax requests
35        dojo.require("dojo.storage.*");     // a persistent local data cache
36        dojo.require("dojo.json");          // serialization to JSON
37        dojo.require("dojo.dnd.*");         // drag-and-drop
38        dojo.require("dojo.lfx.*");         // animations and eye candy
39        dojo.require("dojo.widget.Editor2");// stable, portable HTML WYSIWYG
40    </script>
41
42Note that only those modules which are *not* already "baked in" to dojo.js by
43the edition's build process are requested by dojo.require(). This helps make
44your application faster without forcing you to use a build tool while in
45development. See "Building Dojo" and "Working From Source" for more details.
46
47
48Compatibility
49-------------
50
51In addition to it's suite of unit-tests for core system components, Dojo has
52been tested on almost every modern browser, including:
53
54    - IE 5.5+
55    - Mozilla 1.5+, Firefox 1.0+
56    - Safari 1.3.9+
57    - Konqueror 3.4+
58    - Opera 8.5+
59
60Note that some widgets and features may not perform exactly the same on every
61browser due to browser implementation differences.
62
63For those looking to use Dojo in non-browser environments, please see "Working
64From Source".
65
66
67Documentation and Getting Help
68------------------------------
69
70Articles outlining major Dojo systems are linked from:
71
72    http://dojotoolkit.org/docs/
73
74Toolkit APIs are listed in outline form at:
75
76    http://dojotoolkit.org/docs/apis/
77
78And documented in full at:
79
80    http://manual.dojotoolkit.org/
81
82The project also maintains a JotSpot Wiki at:
83
84    http://dojo.jot.com/
85
86A FAQ has been extracted from mailing list traffic:
87
88    http://dojo.jot.com/FAQ
89
90And the main Dojo user mailing list is archived and made searchable at:
91
92    http://news.gmane.org/gmane.comp.web.dojo.user/
93
94You can sign up for this list, which is a great place to ask questions, at:
95
96    http://dojotoolkit.org/mailman/listinfo/dojo-interest
97
98The Dojo developers also tend to hang out in IRC and help people with Dojo
99problems. You're most likely to find them at:
100
101    irc.freenode.net #dojo
102
103Note that 3PM Wed PST in #dojo-meeting is reserved for a weekly meeting between
104project developers, although anyone is welcome to participate.
105
106
107Working From Source
108-------------------
109
110The core of Dojo is a powerful package system that allows developers to optimize
111Dojo for deployment while using *exactly the same* application code in
112development. Therefore, working from source is almost exactly like working from
113a pre-built edition. Pre-built editions are significantly faster to load than
114working from source, but are not as flexible when in development.
115
116There are multiple ways to get the source. Nightly snapshots of the Dojo source
117repository are available at:
118
119    http://archive.dojotoolkit.org/nightly.tgz
120
121Anonymous Subversion access is also available:
122
123    %> svn co http://svn.dojotoolkit.org/dojo/trunk/ dojo
124
125Each of these sources will include some extra directories not included in the
126pre-packaged editions, including command-line tests and build tools for
127constructing your own packages.
128
129Running the command-line unit test suite requires Ant 1.6. If it is installed
130and in your path, you can run the tests using:
131
132    %> cd buildscripts
133    %> ant test
134
135The command-line test harness makes use of Rhino, a JavaScript interpreter
136written in Java. Once you have a copy of Dojo's source tree, you have a copy of
137Rhino. From the root directory, you can use Rhino interactively to load Dojo:
138
139    %> java -jar buildscripts/lib/js.jar
140    Rhino 1.5 release 3 2002 01 27
141    js> load("dojo.js");
142    js> print(dojo);
143    [object Object]
144    js> quit();
145
146This environment is wonderful for testing raw JavaScript functionality in, or
147even for scripting your system. Since Rhino has full access to anything in
148Java's classpath, the sky is the limit!
149
150Building Dojo
151-------------
152
153Dojo requires Ant 1.6.x in order to build correctly. While using Dojo from
154source does *NOT* require that you make a build, speeding up your application by
155constructing a custom profile build does.
156
157Once you have Ant and a source snapshot of Dojo, you can make your own profile
158build ("edition") which includes only those modules your application uses by
159customizing one of the files in:
160
161    [dojo]/buildscripts/profiles/
162
163These files are named *.profile.js and each one contains a list of modules to
164include in a build. If we created a new profile called "test.profile.js", we
165could then make a profile build using it by doing:
166
167    %> cd buildscripts
168    %> ant -Dprofile=test -Ddocless=true release intern-strings
169
170If the build is successful, your newly minted and compressed  profile build will
171be placed in [dojo]/release/dojo/
172
173-------------------------------------------------------------------------------
174Copyright (c) 2004-2006, The Dojo Foundation, All Rights Reserved
175
176vim:ts=4:et:tw=80:shiftwidth=4:
Note: See TracBrowser for help on using the browser.