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:
If we ignore the frameworks and think of the meta-point it is a lot more interesting.
Posted by Dion Almaer at 10:12 am