Activate your free membership today | Log-in

Thursday, July 3rd, 2008

Shrinking frameworks; Dojo in 6k

Category: Dojo

<p>Dojo is a framework that you can bend for your needs. You have very fine grained control on what you want in your base dojo.js, how other components are loaded, and a final custom JavaScript file.

Brad Neuberg showed a project, SearchTools, that added local search via Gears, and had a custom Dojo that wasn’t Dojo in a very small package.

Alex Russell has taken this further and explained how he got Dojo to 6k by implementing a stub loader, so many of the functions were lazy loading stubs instead of full method bodies.

His use case was mobile, or small embedded devices in general:

On an iPhone with a clean cache the stubbed-out dojo.js cut in half the time required to load and evaluate. Sure, it’ll take more time on the network when parts of the toolkit are actually used (say, in response to a click event), but for mobile device scenarios, it’s going to be hard to beat the flexibility and speed of the stub loader when pulling Dojo into a page.

The post really wasn’t about Dojo per se, but John Resig parsed the sentence: “Even so-called “lightweight” libraries like jQuery” and in one part of a three part post hit back:

The way it’s worded you would assume that you were paying a large, up-front, cost to using jQuery when, in fact, there is very little overhead. jQuery has been shown to be the fastest loading JavaScript library for non-cached code and considerably fast for cached code.

If we ignore the frameworks and think of the meta-point it is a lot more interesting.

Related Content:

  • Ajax framework released
    Simplified Ajax development is the goal of a new framework from Emergetk, released under the General Public License (GPL). It is written in C# and the...
  • Hot skills: Dojo encourages Ajax innovation
    What is it? In April 2006, a reviewer provided a round-up of 50 different Ajax frameworks and toolsets - and the number has certainly increased since...
  • IBM goes open source with Ajax
    IBM is partnering with the Open Source Dojo Foundation in its quest to improve Ajax development. Big Blue also donated code to Dojo to help jumpstart...
  • jQuery finds important role in Ajax-style open source framework development
    The jQuery open source library and framework has gained greater attention among a slate of frameworks that includes Dojo, Prototype, GWT and others....
  • Shrink Wrapped SOA
    Microsoft has announced that it will be entering the SOA market with the release of "Shrink Wrapped SOA." The package, intended to release in...

Posted by Dion Almaer at 10:12 am
Comment here

++++-
4 rating from 29 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.