
Greetings to all readers. And so, it was accomplished what many (or at least someone for sure) waited and anticipated. Yes,
the release version of the most powerful and real “web of two-full” library for the development of AJAX web applications
Dojo Toolkit has finally been released . It is for application development, since I can hardly imagine a regular website that would use at least ten percent of all possibilities, except perhaps limited to the dojo package, and there are also dojox and dijit, although, in my opinion, it was formed during the period of active development of version 0.4.3 (yes, such antiquity and fossil, but in some moments it is even better or simpler than even the latest version), with Dojo’s visual part didn’t work out very well. Yet
ExtJS is several orders of magnitude higher and there are no alternatives yet that would overthrow it from the throne.
But back to our business. Having gone through a rather long evolutionary path of development and change of several architectures, Dojo has finally begun a stable development stage, at which it can already be not only considered as a technological platform for its project, but also fully realistically used. Version 1.1 introduces a lot of changes and improvements, and I would recommend that this release be considered as a tool for myself. What has appeared new and interesting for an ordinary developer? Now consider.
Package dojo . Many general improvements, API and documentation updates, changes and bug fixes in CSS / templates, improvements and code changes to remove residuals and dependencies from previous versions (the architecture and API have changed several times, but some modules have lived since the days of previous versions with almost no changes, including without supporting the new API structure). Improved work with templates and language resources for creating multilingual applications. Please note that many CSS styles have changed, so if you used dijit to build a user interface, you will have to check the code for changes.
There was an interesting opportunity at the same time (as I understood) to work with several versions of Dojo on one page, up to combinations of very early releases of the 0.4.x branch and the latest 1.1. Of course, this is a very specific functionality and there are many features and pitfalls, but it also indirectly demonstrates the flexibility and independence of the architecture and concepts underlying the project. You can read more about this feature in
the Dojo book section .
')
The library loading process itself has changed a bit - now you can specify through the configuration that Dojo should load after loading the main page, and not at the very beginning. Previously, for complex applications, it was necessary to set various download indicators and masks, but it is better to wait and load, because basically the web application is loaded for the entire session only once. But here’s something, and the resource intensity of the Dojo download was often very ... serious, at least I watched it all the time for almost a year, developing a large online project that used a bundle of Dojo and ExtJS. Now you can optimize it, so if you approach the design responsibly and reduce the number of modules used to the required minimum, the performance will increase significantly, or at least the process of loading individual components will not be so noticeable.
The integrated component for data transfer to the server,
dojo.xhr , which acts as an abstraction of native XMLHttpRequest, expands its capabilities, has been significantly updated. Now there is an implementation of methods other than GET / POST, for example, PUT / DELETE, but it also became possible to expand the module by implementing the necessary queries on its own. It seems to me that the most requested and interesting HEAD request will be to check for updates of the specified page. This module was always the most powerful and functional in Dojo, but now it has expanded even more (although I remember that in the first versions there were more alternative transports, now there is only a native object, iframe and script-tag). Oddly enough, but only now he finally correctly inserts the X-Requested-With header into requests sent via the XMLHttpRequest object — why it was not there before and who forgot where to do it and when it was forgotten (in parallel to one of the OpenSource discussions on habrahabr .ru - and where was the community, because I had to wait for the release, sorry for the offtopic).
Improved work with the browser cache, now it can be used when working with built-in templates (or vice versa, disabled).
The strength of working with the attributes of DOM nodes has changed positively, and the work with CSS styles has been simplified through the built-in class
dojo.style , for which many thanks to the developers. The
dojo.query module was also improved, through which it was possible to request individual nodes and whole branches of the DOM tree in an easy way.
The animation module, a unique functionality for most web libraries, has undergone significant alterations, there is simply a huge amount of changes and improvements, some algorithms and animation techniques say it was transferred from Flash, probably to simplify the development of various effects and dynamic applications. They promise improved performance and rendering (since the minimum duration has decreased from 1 second to 350 ms, or rather, I would say more about the minimum “tick” of redrawing). This also includes changes in other modules responsible for various effects and graphics - for example,
dojo.fx.Finally, following the new trends in the web industry, Dojo received support for all the capabilities of the Adobe AIR platform, which opens up fantastic opportunities for web application developers, especially in light of the opportunities already present in Dojo (most of which are in the experimental and innovative Dojox modules).
Package Dijit . This package contains visual elements and widgets for creating user interfaces and various forms. In this release, mainly cosmetic changes were made to the package, new themes were added, and several widgets —
SimpleTextArea , a non-expandable simple text field, and a multi-select widget for selects with support for selecting several elements at once. There was a new type of layout -
BorderContainer , which replaced the outdated SplitContainer / LayoutContainer variants, as well as the
Tree module, which was often criticized for unstable and just different work in different browsers, in particular, for strange work with DnD - now this should not be like.
Package Dojox . It is here that the main innovative modules and functionality are assembled, which previously could hardly have been implemented at all (or rather, it could have been implemented, but sometimes it didn’t even seem like it was just rather difficult and nontrivial in itself). Among the changes, we should highlight the changes of the DTL module - now you can declare widgets and other elements in templates using for / if control structures. The enhanced animation and effects
module dojox.gfx has also been updated, which is used in the Web drawing tool example (such a vectorial “drawing” on AJAX / VML / SVG right in the browser, and also with the possibility of multi-user work). The drawing module of various graphs and charts
dojox.chart has also been updated , which is sufficiently functional to in many cases replace either the server implementation or even web services about Google.
The cryptography and encryption modules (base64, light base64, ascii85 algorithms) are now merged into one, and in the next version a separate crypto module will be removed. By the way, there was also an information archiving module that supports two algorithms, LZW and Splay.
To the delight of many, a built-in
highlight module appeared for syntax highlighting inside the code block in various programming languages. Now it is possible to create some projects focused on developers or specialized CMS, in which when creating articles with code they will stand out beautifully. Yes, and there are still many application options; earlier, for this, it was necessary to use third-party solutions, often only server-side ones, now this is built-in functionality.
The
store module has also been updated to abstract and unify various methods of storing and presenting data, including remote services like Flickr and Picasa. In addition, you can work with data in formats Atom, OPML, XML, HtmpTable and many others.
Personally, I select the most expected and necessary module -
storages , which was finally completely rewritten for version 1.1, and supports transparent work with any available methods of storing information on the client - and a plug-in Flash object, and AdobeAIR Storages (as many as three types, including file and protected), and Google Gears and HTML 5 Storages. This is the most powerful and necessary functionality, which many developers really expected, and to which there are no real competitors among all other libraries.
There are a lot of unique modules in the Dojox package that you can, and should, write many more articles about. At the end of the article I will single out only one module, which, as far as I remember the previous releases, appeared just now, but there is no mention of it in the official press release. This is an analytics module (
dojox.analytics ) which allows you to flexibly configure the "tracking" of all actions on the page, for example, tracking movements or other user actions. Information about all actions (and even inaction) is sent to the server and can be used to analyze user behavior, detect its work or inaction with the application, create test usability systems and other solutions that need to really and accurately know what the user is doing on the web - page.
That's all, I hope that you at least began to show interest in this powerful and even beautiful library. If yes, go to the website
http://dojotoolkit.org and
get acquainted with the possibilities, examples and documentation ,
download the distribution kit and go ...
PS Cross post from my
personal blog .
The original is here: http://abrdev.com/?p=292