Tuesday, February 17, 2009

A CPAN for JavaScript

While there have been attempts to create a CPAN (comprehensive module directory) for JavaScript it has failed just as this has failed for pretty much every language but Perl.

In the last days I've been thinking about a new approach to create such a repository while also solving the problem of high performance JavaScript loading at the same time:
  • Create a central site (such as an application hosted on Google AppEngine) that does the following things:
  • Host any JavaScript file published to it
  • Serve as a reverse proxy server for JS files hosted on other web servers
  • Provide a simple mechanism to associate dependency and versioning meta data with JS files
  • Make any combination of JS files downloadable through a simple URL that serve all data in a single request
This is, of course, only a very rough sketch. The central idea is that sources are never actually installed anywhere but always downloaded on demand when an application requests them. While creating its own set of trust-issues and security holes this would easily solve the installation problem by eliminating it :)

What do you think?
Post a Comment