Dojo Nano: Less than 4KB gzipped!
Dojo 1.7 provides substantial improvements for building desktop and mobile apps using open web technologies. In addition to a wide variety of features and changes, Dojo has been significantly improved to deliver a foundation that’s ideal for building your applications in any environment (web, desktop, mobile, server-side). Starting with less than 4KB (gzipped), you include just the features you need in your application, from Dojo, your source code, and plug-ins hosted by Dojo, GitHub, and others.
Overall Vision: Separation of Data and User Experience
You will often hear us talk about separation of concerns. Your users typically want access to relevant data and information, in a variety of different contexts and experiences (desktop web, mobile, tablets/pads, television, automobiles, and much more).
With this understanding in mind, Dojo provides:
- Tools to mix and match to create your app
- Simple APIs to seamlessly separate data from UI logic
- Modularity for very simple projects that’s flexible and consistent enough to handle the most challenging, feature-rich web apps
By truly separating data from your user experience, you can efficiently deliver amazing results to the users of your applications. In a world of many diverse platforms, the separation of data and user experience is key to giving your users access to the data and information they want, in an experience that’s ideal given the context (device, task to be conducted, etc.). It’s definitely a concept that’s gaining popularity, for example the experimental model-driven views library from Google.
Getting There: Compatibility and API Changes
One of our major goals with the Dojo Toolkit is that your application should be easy to upgrade between point releases, e.g., 1.5 to 1.6, and we only make major, incompatible API changes when changing major version numbers, e.g. 1.0 to 2.0. In order to guarantee this API compatibility and consistency, we need time to make sure our APIs are stable and solid. The changes in Dojo 1.6 and 1.7 represent a major refactoring of Dojo for 2.0, while preserving compatibility with previous versions of Dojo. Thus, there are a flurry of new APIs that you should consider to represent Dojo 2.0 alpha or beta, while still being able to safely use existing APIs that may be deprecated in 2.0.
We will discuss many of these changes in more detail through blog posts, tutorials and web site updates in the near future. Here’s a brief summary of the major changes.
Optimized Resource Loading: Asynchronous Module Definition
Key Considerations in working with AMD include:
- Package Management
- Modularity of code as well as ease of cross-project sharing, while reducing side effects and testing complexity
- Optimization: reduced size balanced with number of requests
- Feature Detection and user-agent optimized builds: has.js and optimized builds for common user agents
- Reconstitution: easily combining modules from Dojo, your work, and other projects across the web
The amazing new async loader dramatically improves the performance of your AMD application. For reconstitution of modules outside of Dojo, we have a package distribution system that makes it easy to deploy packages and their dependencies. It is the work in progress CommonJS Package Manager platform, which works well with Dojo and many external projects.
Of particular note is the new dgrid module, a lightweight grid redesigned for performance and modularity.
Dojo 1.6 introduced the new Dojo Object Store API, based on the HTML5 IndexedDB recommendation. It provides an incredibly intuitive and simple way to include arbitrary data in your user interfaces, with simple APIs for getting and setting data. More advanced constructs like real-time updates with Dojo Socket, validation, caching, and more are simply added through lightweight wrappers. Refinements and stability improvements to this have been added in 1.7.
As announced previously, the event and query systems have been refactored to improve performance, simplify the API, and add modularity. For example, you can now use a very lightweight query system, or include the full Dojo Acme, jQuery Sizzle, or MooTools Slick query engines within your application.
Other major improvements
- “Baseless Dojo”, with far lighter dependencies throughout the Dojo codebase. Expect more efforts in this area towards Dojo 1.8.
- _TemplatedMixin/_WidgetsInTemplateMixin, and _setXXXAttr API refinements
- dijit/focus, dijit/place, dijit/popup, and dijit/registry
- ComboBox/FilteringSelect, with native dojo/store support
- Zoom/pan/data interactions
- BIDI text support
- Gauges, Geo, and GFX improvements, especially for mobile
- Support for Blackberry 6 in Dojo Mobile.
- Dijit support for touch and gesture events on mobile platforms.
- Application controller and MVC, and an updated Dojo Boilerplate.
Testing and Compatibility
In total, we’ve resolved more than 1000 issues since Dojo 1.6. The DOH test suite of tens of thousands of tests passes in all officially supported browsers:
- Chrome: 8.x and newer
- Firefox: 3.6.x and newer
- Internet Explorer: 6, 7, 8, and 9
- Opera: 11.x and 12.x
- Safari: 5.0.x and 5.1.x
Dojo is also tested with popular mobile browsers including iOS 4.x and 5.x, Android 2.x, 3.x, and 4.x, and Blackberry 6, and passes for all supported features in Dojo Mobile, and most features throughout Dojo. Work is planned for supporting Blackberry 7 and QNX, and Windows Phone 7.5.
Use Direct from the CDN, or Download
Get the Dojo release that’s right for you. Choose from CDN, optimized builds, or source versions with full demos and utilities. Please note that if you are upgrading from 1.6 or earlier, we no longer make a distinction between dojo.js and dojo.xd.js (all versions work cross-domain with the new loader), so update your URLs to refer to dojo.js.
Many improvements have been made to the Dojo documentation. The dozens of Dojo Tutorials are being updated for 1.7, in addition to the reference guide and API documentation. Expect these updates to be completed by the end of 2011.
Work on Dojo 1.8 is already underway. We’re anticipating a 1.8 release in Q1 2012, and 2.0 in mid-late 2012.
Read the complete Dojo 1.7 release notes for full details on everything that has changed with Dojo since 1.6.
In the coming weeks, and as a new policy going forward, we plan to issue point releases more regularly for 1.5.x and newer, rather than just for the most current release. The goal with these updates is to fix compatibility issues with new browsers that are released. This will allow you to use Dojo with new browser releases without as much risk in the upgrade cycle. Expect a 1.5.2 release in the near future with support for Firefox 4+ and IE9, and a 1.6.2 release as well with minor updates. Because new browsers are released with increasing frequency, this should help many Dojo users keep their apps running properly with new browser releases. While we’re moving more of Dojo to feature detection, there are still no guarantees that everything works as expected in new browsers, especially when changes are as dramatic as IE8 to IE9 for example.
And as always, we appreciate your interest and usage. If you find an issue with Dojo, have a suggestion, or see anything on the site or within the documentation that you think should be better, please register for a Dojo Foundation account and open a ticket.