The module framework

The module framework allows extensions to contribute to different areas of a page to provide flexibility, enhance the user experience, and maximize performance.

The modularization framework decouples feature enablement from the theme code itself. This framework allows themes to be developed more easily with little knowledge about the details of how underlying code for a feature works.

The framework provides logical points where modules can contribute data into a theme at run time and to optimize those contributions by combining them where possible. This framework allows multiple disparate remote sources to be combined into one request for greater performance.

It also provides a way to enable and disable features of a theme by means of configuration, through a profile. You can spend your time focusing on the interface design of the theme without being concerned about the details of how to get features to work correctly within their theme. It also provides them an easy way of turning off features that they do not need in one environment that they might use in another environment.

For example, you can disable editing capabilities in a production portal environment while enabling them in a development environment. The same theme code can be used across such environments where the only variable is the module inclusion profile.

Modules are registered extensions and then consumed by a module profile. Each nodule is enumerated by the modules unique identifiers. Modules might require other modules to allow the automatic inclusion of necessary code required to make a particular feature work.

Another example is the use of the Dojo Toolkit within a module. A module can use the Dojo Toolkit to build custom widgets, but to separate the code for the module from the Dojo code, that module would require the necessary Dojo modules required to ensure that the code is loaded in the correct sequence. This separation allows greater serviceability by decoupling the packaging of the code for each module.