====== Dojo Toolkit == ===== Links == [[dojo>quickstart/index|Tutorial]] --- [[dojo>quickstart/dojo-basics|dojo-basics]] --- [[dojo>manual/index|Reference]] --- [[http://api.dojotoolkit.org/|API Reference]] --- [[http://dojocampus.org/explorer/|Feature explorer]] (incomplete?) --- [[http://dev.aol.com/dojo|Dojo Lib from AOL's CDN]] --- [[http://www.sitepen.com/blog/series/dojo-quick-start-guide/|Old quick start]] --- [[javascript]] ===== Why Dojo? == * Can do what jquery is famous for [[dojo>dojo/query|as well]] * Has complete GUI widgets * Custom (downsized) builds make it attractive for usage on embedded systems ===== First Steps == * [[dojo>quickstart/gettingstarted|Hello World example]] * The syntax for including remote dojo libs can be found [[dojo>quickstart/cross-domain|here]]. The latest Revision number to specify can be found [[dojo>releasenotes/index|here]]. * Debugging and Logging: Use Firebug together with ''console.log()'' and friends. [[dojo>quickstart/debugging|More]] ===== DOM Manipulation == ^ Dojo API ^ DOM API ^ | dojo.byId() | document.getElementById() | FIXME Does this table make sense at all? ===== Use Dojo from your Own Server == Download the "Dojo Toolkit Release" from http://dojotoolkit.org/download#getdojo and install it on your server to ''/var/www/htdocs/lib/'' See also: http://docs.dojocampus.org/quickstart/install#use-dojo-from-your-own-server Note that the ''themeTester.html'' mentioned there does //not// exist in the install. ===== Make a custom Build == A custom build is necessary for example when public [[dojo>quickstart/cross-domain|cross-domain distributions]] are not accessible (isolated network) //and// the size of the [[http://o.dojotoolkit.org/downloads|standard dojo package]] is to big for the server (e.g. on an embedded system). With a custom build you can do both: Reduce the size and make it cross-domain capable. Further reading: [[dojo>quickstart/custom-builds]] --- [[ibm>web/library/wa-aj-custom/|Create optimized Dojo builds for your custom Dojo artifacts]] ==== Make a cross-domain Build == The following exemplary steps build a cross-domain build with standard profile to be installed on the machine of the browser. Hence the browser machine needs a webserver as well! The actual dojo app can live on a space limited device where the browser connects to: - [[http://dojotoolkit.org/download/|Download]] and extract latest stable //source// release - Create the build destination dir as root, eg. ''/var/www/htdocs/lib/dojo/1.4/'' - Cd into dojo-release-1.4.1-src/util/buildscripts - Run this as root:./build.sh profile=standard loader=xdomain xdDojoPath=http://localhost/lib/dojo/1.4 action=release releaseName=1.4 releaseDir=/var/www/htdocs/lib/dojo - The necessary include path then yield to: === Currently known Issues == * ''djConfig.isDebug'' must be set to ''false'' * IE looks for a file called ''ressources/blank.gif'' relativley to the root of your web app when working with the AccordionContainer. === Possible Improvements == In order to furher reduce the size of the lib you may: * Name unused css modules with the ''cssImportIgnore'' command line attribute when calling ''build.sh''. You can easily spot unused css modules by looking at ''dojo-svn/dijit/themes/tundra/tundra.css''. * Unused images may be picked out from ''dojo-svn/dijit/themes/images/''. For, you look in ''dojo-svn/dijit/themes/tundra/tundra.css'' for all references to the ''image'' subdir and there you remove all images which are //not// referenced. ===== Dijit == Dijit widgets are wrappers around native DOM nodes. ''dojo.byId()'' returns the DOM node, whereas [[dojo>dijit/byId|dijit.byId()]] returns the Dijit widget. Dijit widgets have an attribute called ''domNode'' to access the DOM node. [[dojo>dijit/info|More]] ===== Events == Normal DOM events are lowercase (like ''onclick''). Whereas Dojo widget events are camel case (''onClick''). ''dojo.connect'' is a more powerful replacement for native event handling. More: [[dojo>quickstart/events|JavaScript events and Dojo]] / [[javascript#events|Javascript events]] ===== Todo == * Check: [[http://www.ibm.com/developerworks/web/tutorials/wa-dojotoolkit/|Build an Ajax application with the Dojo Toolkit]]