Most of these capabilities can be done with some declarations in the
gatein-resources.xml file of your extension.
See here to learn about the
The notion of module can be viewed as:
An identifier or name.
A list of dependencies on the modules required to work properly.
The code packaged is usually expressed as a self-executing function. The product, which is an object produced by the module, is usually consumed by other modules.
At runtime, the dependency system defines a graph of function to execute that makes the product of each module be injected in the other modules. It can be seen as a simple dependency injection system which can load modules in an asynchronous and parallel fashion providing parallel loading, namespacing and dependency management.