AJAX is the cornerstone of web2.0, and now several popular open source AJAX Web framework, such as: jQuery, Mootools, Dojo, Ext JS and so on, then we in the end under what circumstances the use of that framework? The following is a excerpt of the data:
Ajaxian Ajax tools at the end of 2007, conducted a survey of some results is shown below (which number to use the tool to investigate the percentage of details, see the website): http://ajaxian.com/archives/2007-ajax- tools-usage-survey-results
Prototype of which the highest rates, largely because it was the first mature framework, many previously used in the project, so it has been used
Let's take a look at selected based AJAX framework:
Your project needs (ie what features you need, for example, require the interface to make beautiful, special effects, or other functions)
A rating is supported browsers (IE, Firefox, etc.)?
Documentation Quality: is perfect (including tutorials, API, code samples, etc.)
How the scalability of the framework? As a framework to write plug-ins to be easy?
Do you like the style of its API?
Frame size (too large to download the framework of lead time)
Framework is to force you to change the way to write HTML (Dojo is one such)?
Code execution speed: performance?
Whether the code modular (Mootools is a highly modular)? How to reuse code?
Simple idea: almost all operations are to select DOM elements (a strong Selector), and then to its operation (Chaining and other characteristics).
<br /> Advantages of small, compressed code only 20 k (no compression code 94k).
Selector and the convenience of DOM operations: jQuery's Selector's Element.Selectors.js compared with mootools, CSS Selector, XPath Selector (1.2 post deleted)
Chaining: always returns a jQuery object that can be continuous operation.
Document integrity, ease of use (each API has a complete example, which is now can not be compared to other frameworks), but there are many other online documents and books.
Wide range of applications, including the google code also uses jQuery.
The site uses jQuery: http://docs.jquery.com/Sites_Using_jQuery
The core development team and key personnel: John Resig and so on.
Concise and brief grammar, easy to remember.
Scalability: There are a large number of user-developed plug-ins available ( http://jquery.com/plugins/ )
jQuery UI ( http://jquery.com/plugins/ , based on jQuery, but the core of jQuery and independent), and constantly developing.
Friendly and active community: Google groups: http://docs.jquery.com/Discussion
There are many convenient event handling methods, such as click, rather than a single addEvent and the like.
<br /> The design shortcomings of the pursuit of efficiency and simplicity, not object-oriented extensions. Different design ideas and Mootools.
CSS Selector slightly slower speed (but now has been a substantial increase in speed)
Modular, each module is independent of the code, the minimum core is only 8k, the biggest advantage is that choose to use which module, when used with the modules can only import complete nor to 180k (no compression), compression is not to 70k.
Syntax is simple and intuitive.
Effects (Effects): This is slightly stronger than jQuery, now being developed Mootools UI (Ajax framework that should be the development of a trend).
Code written in beautiful, easy to read and modify.
The complete document (the document the latest 1.2beta more detailed than before.)
Active community: official website ( http://forum.mootools.net/ ), there is a IRC.
Performance: See: http://mootools.net/slickspeed/
Shortcomings <br /> modified some of the lower classes: such as Array, String, etc. This is also the different design ideas.
On the DOM and CSS Selector in jQuery as powerful.
Behind the strong support: IBM, Sun, BEA, etc. It is very important advantage.
Powerful features, Full Stack framework extends the DHTML capabilities such as:
Support and browser Back / Forward button integration.
Dojo Offline, offline storage of a cross-platform API.
Chart component, you can easily generate charts in the browser.
Based on SVG / VML vector graphics library.
Google Maps, Yahoo! Maps components, facilitate the development of Mashup applications.
Comet support, through the common Buyeux agreement.
Powerful UI (Dijit).
Object-oriented design, unified namespace, the package management system (The Package System and Custom Builds)
Defects complex, steep learning curve.
Incomplete documentation of the extreme, this is a big problem.
API lot of instability, the larger the changes between versions, is not yet a mature framework.
Too intrusive, extensive use of dojo page properties, such as <button dojoType="dijit.form.Button">, if in the future to upgrade or switch to a framework dojo, the burden will be great.
Performance problems, due to adopt a synchronous dojo loading mechanism will temporarily lock the browser, causing 100% CPU utilization. In addition, many Widget is very slow.
Fourth, Ext JS
<br /> Component of design to promote the RIA (Rich Internet Application) application.
<br /> Powerful advantages of UI, and good performance, which is its greatest strengths.
Speed control is the UI or other modules.
100% object-oriented and component-oriented thinking, the same syntax, the global namespace.
Document complete, standardized and convenient.
The core development team, Jack Slocum and so on.
Active community, the rapidly increasing volume of users.
Modular implementation, scalability.
All the components (widgets) can be used directly, without having to set (of course, the user can select the re-configuration).
A little complicated.
Framework for the heavyweight (including a large number of UI), bulky. If the import ext-all.js, compression after nearly 500k.
Note: EXT commercial use: If you just extjs included in their projects, and this project is not sold to the secondary development of the toolbox the user to do, or the component library to LGPL agreement to abide by free; or to pay .
Summary <br /> lightweight choice of lightweight choice: mainly mootools and jquery, because of their different design, jQuery is the pursuit of simplicity and efficiency, Mootools addition to the pursuit of these objectives other than its core is object oriented, Therefore, for rapid development of jQuery, Mootools for a little large and complex projects, which need the support of object-oriented; In addition, support for the Ajax, jQuery slightly stronger; in support of the Comet, jQuery plug-ins are related, Mootools does not have, but the core is the Comet server support, browser interface is very simple, related to the development of plug-in is simple.
Framework for RIA
ExtJS: beautiful and "easy", and strong enough. In the UI needs a relatively large, is preferred.
posted @ 2009-01-16 Yu Qi