See your Web application as a valley, each of your JS files as a field in this valley, with sheep (ie. variables and so on...) grazing in the valley.
Wouldn't you be much happier if your sheep kept grazing in the field they're dedicated to, instead of freely moving in that whole valley of yours?
Wouldn't you be even more confident if you could choose which sheep can visit which field ?
Wouldn't you like it if you could still enjoy the beauty of your fields and the valley by avoiding the installation of fences ?
Probably you would.
If so, then it's time to hire a Shepherd for your JS files and applications.
What is it ?
Shepherd is three-fold:
- a module loader
- a dependency manager
- a modularizer (couldn't find any better word...) for your JS files and apps.
Quick features list
- is cross-side, which means it works well in the browser and in the server
- has a ECMAScript Harmony compatible syntax
- is non-destructive to your files. Your JS will execute even without Shepherd, but they'll do so much better with it! (module declarations are within comments)
- requires near-zero time to update your existing code
- Works even with files/libraries you can not modify (eg, jQuery from a CDN)
Want more ?
Have fun with Shepherd! Once it is in use, take a chair and enjoy the view, your valley is really gorgeous!