root / branches / xdomain / README

Revision 2528, 5.9 kB (checked in by alex, 3 years ago)

explanitory text about what to extract

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