Open In App

Dojo Introduction

Last Updated : 13 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Dojo is an open-source library that is used for the development of fast, robust, and scalable web pages. It works on javascript. It is the same as another javascript toolkit that is used for designing web pages and cross -platforms applications. The main feature of this toolkit is that Dojo has a core component that is loaded asynchronously, and for this, It is loaded quickly.

Apart from that Dojo is not so popular as compared to other frameworks of javascript. But it is used by IBM for making sliders, and navigators for web pages. The dojo is used in the web pages because it has the following properties:

  1. It can manage complex applications.
  2. The dojo is used to create efficient applications and also global applications,

Get The Dojo Toolkit: By the Google CDN, means we can put the following tag in our web page HTML file.

<script src=”//ajax.googleapis.com/ajax/libs/dojo/1.14.1/dojo/dojo.js”></script>

Features of Dojo: There are many features of the Dojo. Some of them are described below:

  • The dojo is easy to learn.
  • The dojo is the toolkit that is used to develop the application which is highly user interactive.
  • Dojo has the functionality for making widgets, Routing, and also use for state management.

Components Of Dojo: The Dojo toolkit is a javascript framework that is used for making the user interactive web pages. Dojo has three major components which are described below:

  • Dojo Core: It included all the features which need to develop any web pages. It also included many features which are not included by any other framework of Javascript.
  • Dijit: It is like the CSS which holds the Interactive widgets for developing the javascript and ajax applications. Which makes the applications user interactive.
  • Dojox: It has the Dojo extensions. It holds the widgets and API features that are used for developing the javascript and ajax applications for making the applications highly user interactive and fast loading capabilities. 

Dojo Architecture: As we learn, about the Dojo toolkit it contained the above-mentioned components for making the applications. And some of them are also described here:

  • Dojo Base: It contains features that are included already. It doesn’t need to include using them.
  • Custom Code: It contains the whole other files that are necessary for making the application. Some of them like- HTML, JavaScript, CSS, etc.
  • Util: It contains the tools which need to make the application optimal, and is also used for code and syntax testing.

Dojo Architecture

Advantage Of Dojo: Dojo has the following advantage which makes it different from any other javascript framework:

  • It has the normal means of loosely typed variables
  • It has the associative array properties
  • It also has Objects and classes.

Disadvantages Of Dojo:

  • Dojo doesn’t work on all types of web-browsers
  • Dojo has not been featured for hiding the code. So for this reason we can not use it for developing the commercial application.
  • Dojo has many network requirements for working properly.

Example: Below is the basic example of “Hello World” by Dojo:

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>DOJO WITH GFG</title>
</head>
  
<body>
    <h2>HELLO WORLD</h2>
    <!-- loading Dojo by using google cdn-->
    <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js" 
            data-dojo-config="async: true"></script>
</body>
  
</html>


Output:

Hello World



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads