Archetype work on a JavaScript library which we call its engine. There is an abstraction layer between Archetype and its library which allow to choose any JavaScript library for which we made the wrapper.
There are currently two engine wrapper ready to use: one for Prototype and another for jQuery .
For choosing your engine, you just have to set Archetype.engine with the name of which you want:
/** * Default JavaScript Framework engine for the whole application * * Existing choices : * - prototype (Prototype 1.6) * - jQuery (jQuery 1.3) */ Archetype.engine = "jQuery"; //or Archetype.engine = "prototype";
You can see in the modules configuration that there is the wrapper configured and that it specify needs on the library itself:
/** Implementation dependencies, these can use needs (they aren't transitive however) but not subModules **/
//-- engines dependencies
"Archetype.engine.jQueryEngine":{needs:["Archetype.libs.jQuery.jquery", "Archetype.libs.jQueryEnumerable"]},
"Archetype.engine.prototypeEngine":{needs:["Archetype.libs.prototype.prototype"]},
//-- jQuery related
'Archetype.libs.jQuery':{rPath:"Archetype.libs.jQuery.1#3"},
'Archetype.libs.jQueryEnumerable':{rPath:"Archetype.libs.jQuery.enumerable.jquery#enumerable"},
You can change these configuration to change libraries version (but we can't assure compatibility with all versions). Just be careful, the dependency resolution feature is not ready when Archetype read this configuration so you can use only direct dependencies.