Getting started with dojo

Download dojo eBook

Remarks

This section provides an overview of what dojo is, and why a developer might want to use it.

It should also mention any large subjects within dojo, and link out to the related topics. Since the Documentation for dojo is new, you may need to create initial versions of those related topics.

Versions

VersionRelease Date
0.4.42006-11-05
1.0.32007-11-05
1.1.22008-03-26
1.2.42008-10-02
1.3.32009-03-26
1.4.62009-12-07
1.5.42010-07-22
1.6.32011-03-15
1.7.102011-10-27
1.8.122012-08-15
1.9.92013-05-01
1.10.62014-06-13
1.11.22016-06-09
1.12.12016-12-21

Installation or Setup

Use Dojo from CDN

Load Dojo through <script> tags in your HTML page pointing to Google CDN.

Example:

<script src="//ajax.googleapis.com/ajax/libs/dojo/1.11.2/dojo/dojo.js"></script>
 

Install Dojo with Bower

Type the following command in your project directory:

bower install dojo/dojo dojo/dijit dojo/dojox dojo/util
 

Bower installs to a bower_components sub-directory by default, but if you'd like to install to the current directory instead add a .bowerrc with the following:

{
    "directory": "."
}
 

Sample page

This example is a sample page that shows how to use Dojo to display a "Hello world" text inside <h1> tag.

<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <title>Dojo sample</title>
    <script src="//ajax.googleapis.com/ajax/libs/dojo/1.12.1/dojo/dojo.js" data-dojo-config="async: true"></script>
  </head>

  <body>
    <h1 id="Hello"></h1>
    

    <script>
      require([
        'dojo/dom'
      ], function(dom) {
      
        dom.byId('Hello').innerHTML = 'Hello world';
      });

    </script>
  </body>

</html>
 

Use dojo themes from CDN

Dojo provides us various themes like tundra, claro etc.

Load themes using link tag in your HTML page pointing to Google CDN.

Stats

89 Contributors: 6
Wednesday, June 14, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook