The code generation template set

Genero Studio provides a standard template set of files that are used for code generation. The files are written in XML and Tcl.

Figure: Code Generation flow

This figure is a flow diagram BA Diagrams flowing to XML files flowing to Code Generation Engine flowing to 4gl Application code. Tcl, XSL, and Python templates are also input into the Code Generation Engine.

It is recommended that you use the most current template set for your Genero Studio installation. The GSTSETUPDIR environment variable specifies which template set is used.

Template directories

The template sets are located at GSTDIR/bin/src/ag/tpl/. Each template set directory name starts with "dbapp" and ends with the template set version number.

The contents of template sets have changed as the template sets have developed. Most template sets include the files settings.agconf and creatables.conf.

Tip: When modifying a template set, do not modify the original template files. Instead, make a copy of the directory. Copy the entire content of the template directory (for example, GSTDIR/gst/bin/src/ag/tpl/dbapp) to a new directory. The new template directory could be a common one on the server or it could be part of the entire versioned project.

Applications generated in older templates

An application uses the template set that was active when the application was generated. To use an application that was generated in an earlier version of Genero, do one of the following: