r1 - 18 Oct 2007 - 02:56:58 - DovKatzYou are here: TWiki >  JSLoader Web > HowItWorks

How it works

Below is a sample directory structure. The main file jsloader.js will discover how it's been loaded on the page, and source all of the subsequent calls to the directory containing it (remote or local).

Essentially, all assets are categorized (for now I dump all libraries under the "ria" category, but imagine having proprietary libraries at your company, or from different software teams in a large enterprise, - each case would warrant another category. After the category comes the product name, such as "prototype", "ext" or "scriptaculous". Then version/release folders, which contain the actual files.

After this is set up, we create a "fake" release called "incr" and inside there we can put configuration data, but most importantly, the "library descriptors" which are JS files, that use the JSLoader API to conjur up the exact recipe needed for adding libraries to your webpage.

The best thing to do is use firebug and visit http://www.jsloader.com and you'll see what I'm talking about.

Sample Directory Structure


 /assets/jsloader.js
 /assets/ria/
 /assets/ria/prototype/1.5.1/prototype.js
 /assets/ria/prototype/1.6.1-pr0/prototype.js
 /assets/ria/incr/versions/1.5.1.js
 /assets/ria/incr/versions/1.6.1-pr0.js

-- DovKatz - 18 Oct 2007

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback