JSLoader "On Demand JavaScript Libraries"

Dov Katz has released JSLoader, an open source on-demand JavaScript library, developed by Dov Katz, Imran Ahmad and Aaron Satlow as part of a hosted Enterprise AJAX solution. JSLoader is a dead-simple, non-intrusive "Javascript-on-demand" packaging convention which helps developers and the internet community rapidly develop and prototype applications without the headache of figuring out the witches' brew […]

Dov Katz has released JSLoader, an open source on-demand JavaScript library, developed by Dov Katz, Imran Ahmad and Aaron Satlow as part of a hosted Enterprise AJAX solution.

JSLoader is a dead-simple, non-intrusive "Javascript-on-demand" packaging convention which helps developers and the internet community rapidly develop and prototype applications without the headache of figuring out the witches' brew of files that need to be copied, included, etc.

Dov B. Katz explained to us:

It provides a methodology for organizing JS libraries, and programmatically loading them by simply “asking” for them. Example code: JSLoader.load(“ria”,”ext”,”2.0-beta1”);

I developed it as a mechanism to provide hosted Ajax libraries within a large enterprise (zero install, we maintain the latest releases) and it has been very successful. Furthermore, because no install is needed, I have leveraged TWiki to create a rapid prototyping environment, which has led to widespread adoption in the enterprise.

Ultimately, it’s just dynamically writing script and link tags onto the page… Not rocket science, but it works well, and it’s proven its value in an enterprise environment.

Why JSLoader?

  • First of all, it’s a zero-install solution. The goal is to eventually deploy this style of loading and file organization on a “hosted toolkit” system and allow websites to leverage the distribution of new toolkits without having to figure out how to install them.
  • Second, because multiple sites will share this code the browser and proxy caches will help make things more efficent
  • Finally, the maintainability of toolkits is minimized as content needs to be distributed only once, instead of having each user download a private copy

You can see some demos such as PlotKit.

How do I get started?

// First Load the Script <script src="http://vps.jsloader.com/assets/jsloader.js">// In one script block JSLoader.load("ria","prototype","1.5.1"); JSLoader.load("ria","prettify","1.0");// In another script block: Event.observe(window,"load",prettyPrint);// JSLoader takes care of the rest! // Prettify will take any <pre class="'prettyprint'"> // and color-code them.

Dov is going to be at The Ajax Experience this week in Boston. He is keen to meet you to discuss it!

JSLoader, Script, Java, JavaScript, Library