Tuesday, April 10th, 2007
Coach Wei of Nexaweb has been spending time on the Dojo Footprint and Ajax Performance Recommendations.
Coach compares the Ajax usage scenarios, from building a rich application, to doing a little HTML enhancement.
He ran a Dojo Performance Overhead Challenge which involved creating a simple widget with Dojo, and one from scratch:
After building and packaging the my simple Dojo widget, the custom build produces a new dojo.js that has packed all necessary files, but only the necessary file, into one single download. The footprint of this custom dojo.js is 168KB.
In contrast, if I wrote this simple widget from scratch without using Dojo, its footprint would be under 10KB(with compression, it would be under 2KB).
Given the dramatic difference in footprint, my conclusion is that Dojo is not suitable for this use scenario.
There are three use scenarios of Ajax technologies:
- HTML enhancement: Using Ajax to enhance HTML pages. In this case, the majority of the application code is HTML and CSS, and Ajax is only a small portion of application code that provides enhanced interactivity;
- Web Widget: Using Ajax to develop an embeddable web widget. Widgets are small code snippets that can be easily embedded by third party websites to provide focused functionality. The popularity of widget is so high that Newsweek even declared that â€œ2007 is the Year of Widgetâ€. Ajax is certainly the technology of choice for developing widgets.
- Desktop-like web application: Using Ajax to develop a desktop-like application. The application contains many screens. Majority of the application code is based on Ajax and HTML/CSS are only to compliment these Ajax code.
This discussion isn’t just about Dojo, it is about any of the frameworks, and it needs to be discussed as the community to make sure we come up with solutions that allow Ajax to continue to grow as a development platform.
Would the initial download matter so much if the browser cached Dojo libraries?
Dylan Schiemann responded discussing how the Dojo team is pushing hard to solve some of these problems.
Posted by Dion Almaer at 9:47 am