Dojo what can be done??
1 , making it easier for developers to add dynamic capabilities to Web pages, or to use Dojo in other JavaScript-enabled environments;
2 , using the components provided by Dojo, developers can improve the usability and interactivity of WEB applications;
3 , Dojo largely masks differences between browsers, so developers don't have to worry about whether Web pages are available in certain browsers;
4 , you can also write a command-line unit test code for your code, using the tools provided by Dojo.
5 , Dojo's packaging tools can help you optimize your JavaScript code and build only the minimum set of Dojo packages required to deploy your application.
6 、...... Wait
Dojo Architecture (only part of the package, online search)
First layers are Dojo's widget systems, and widgets refer to an element in the user interface, such as buttons, progress bars, and trees. widgets allow you to manipulate buttons, menus, and more, including styling and event handling. Simply add a simple label to the page.
The second layer is the Application support library, Dojo Most of the code is on this level, and most of the time we call this layer API .
The third layer is the environment-related package, which is the function of the package to handle cross-browser issues.
The fourth layer is the language library, which contains some language tools APIs, similar to the Java util package.
The bottom layer is the package system, the Dojo API is similar in structure to Java, it divides all the APIs into different packages, and when you want to use an API, just import the package that contains the API.
is only part of the hundreds of packages provided by Dojo, which are placed in three first-level namespaces: Dojo,dijit and DojoX. Where Dojo is the core Feature Pack, Dijit contains all of Dojo's Widget components, while DojoX is an extension or experimentation feature, the experimental functionality in DojoX is likely to be moved into the Dojo or Dijit namespace in subsequent releases after maturity.
Jquery and the Dojo macro Comparison:
The first statement, not absolute, opinion.
1 , Frame size
Dojo is a heavyweight development framework, composed of the framework core (dojo), the basic Control Library (DIJIT), the expansion pack (Dojox), and the three parts are provided by dojo officials;
jquery is a lightweight framework that itself contains only the framework core and a separate open source project jquery UI with jquery, which provides the 8 most commonly used controls.
nor is it absolute, If you use Dojo,dojo like jquery, it's a lightweight JS library.
If you use Jqueryui+jquery, then jquery is the heavyweight JS library.
2 , Programming methods
Dojo uses object-oriented programming to provide a guarantee for large-scale application development.
jquery uses functional programming, which is more flexible and fast to develop small-scale applications.
Dojo's object-oriented capabilities are enhanced and normalized on the basis of JavaScript, providing object-oriented programming capabilities that native JavaScript does not have, such as parent method overloading (note, not rewrite), multiple inheritance, constructor call chaining, and so on. and provide a series of object-oriented programming specifications of functions and properties declare, inherit, Declaredclass, extend, and so on as Dojo's own programming basis. In dojo, all UI controls are defined as classes, and many of Dojo's core library of functions are also defined as classes, all for better code reuse considerations.
javascript is essentially a functional programming language, jquery does not change the way JavaScript is programmed, making its learning costs much less. jquery No object-oriented programming at all , but not necessarily as dojo So intuitive, with jquery this
3 , Code style
Except for the iconic "$" symbol of jquery, Dojo and jquery are basically similar in naming and parameter lists on some common APIs.
4 , learning costs
from the above analysis, we take off JavaScript is essentially a functional programming language, jquery does not change the way JavaScript is programmed, so that its learning costs are greatly reduced, there isJavascriptThe basics of programming are easy to get started. But if you want to make an interface with a higher user experience, it's not possible to rely on technology alone. BecauseDojoand theJqueryboth codes are similar in style, so there areJqueryBasics, LearningDojois not very difficult. Conversely, thereDojobasis, and then to learnJqueryit's not hard.
5 , scope of application
Dojo has prominent features in object-oriented support, code architecture, multi-pole module loading mechanism, and control integrity, and is suitable for enterprise-level or complex large-scale web application development.
The jquery architecture and mechanism is relatively simple, easy to develop, and widely used for relatively simple web 2.0 development.
Dojo and jquery are designed for complex application development and simple application development, respectively, but not absolutely, depends on how developers use. If it's an app with too much UI interactivity, choose Dojo, but it's a good idea to choose the jquery+jquery UI .
Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.
What is Dojo? What is the result of a macro comparison with jquery?