Template Factory

Topic updated 2-7-2007

The Template Factory window can be opened from the Tools menu. It gives an overview of all templates loaded into the GenWise Studio IDE, and their Template Options. You can use the Template Factory to manage Template Chains.

Templates are basically C# classes that generate code using the GenWise Framework. The framework contains many classes to support the template writing process. Templates all implement standard interfaces that must guarantee that the generated could gets picked up by the GenWise environment.

All templates are built into DLL's. A set of templates belonging together is called a template chain. The BO-Layer NHibernate implementation is a good example of such a chain. This chain contains the BO-Layer template. If we look a the template factory in the Tools menu we will see a picture similar as below:

 

TemplateFactory1

 

Templates are automatically detected when there are placed in a special directory under the GenWise Structure, called the TarRoot. All Dll's that are placed here are automatically inspected by the GenWise environment and loaded on startup. This way automatic registration of templates to the GenWise environment needs no interaction.

After loading of the templates all loaded templates are called the template factory.