Rob Rohan's Lab


Sortie is a set of javascript libraries that provide a common interface between browsers and javascript libraries. While Sortie itself has built in libraries (such as XMLHttpRequest wrappers and some UI functions), it's goal is to allow the use of any libraries. Meaning you could use Spry widgets or Yahoo! widgets or fragments of the Dojo framework from within the same application. The interaction and inclusion of the libraries being control by Sortie.

All of Sortie's code is within the Sortie Namespace.

Sortie has a preprocessor that allows you to include javascript libraries from within javascript code, and also lets you set required dependencies from within your libraries. The dependency checker can check version as well as simply existence.

For example, to include libraries into your application on your main entry point you would use code like the following at the very top of the library file:

     include:new Array(

This would include those javascript files into the runtime. After the files are included, any library dependency checks are performed. You can register a dependency in your library by using code similar to the following:

     require:new Array(
         { c:"Sortie.Util.Collections", v:"0.2"},
         { c:"Some.Other.Class" }

Where c stands for Class and v stands for version (optional)