Home > Javascript, Resources > Lazy Loading and Packaging of Javascript (DojoPackageSystem)

Lazy Loading and Packaging of Javascript (DojoPackageSystem)

Ever download a huge javascript library that did a million things, yet you only needed a very small portion of it? Sure, you may be able to extract what you need, but most of the JS code written out there isn't as modular as we would like. There are tons of global vars. Functions referencing one another, etc.

Well, the folks working on the DojoToolkit have come up with a nice way to "Lazy Load" and package Javasctript functions. A snippet from the site:

The packaging system allows you to list a single script include file, which will then find and fetch packages as they are needed for your application, from the Dojo source tree. This means in the simplest case, no build process is required, and yet there is no need to include a script tag for every script file that is to be loaded.

Additionally, the packaging system allows for the creation of a compressed package file that contains all of the script code needed for your app, no more, and no less, through an Ant build step.

Read more ...

Related posts:

  1. Extending the JavaScript DOM Interfaces
  2. IP to Country lookup, US Zipcode Database (free) and much more!
  3. Javascript Enabled Stylesheets
  4. Writing Efficient Javascript Code
Categories: Javascript, Resources Tags:
blog comments powered by Disqus