How to Work with Templates

Previous Next

If you want to re-use GUI classes from a template, first make the template, and then develop the application based on it.

You can go back and change the template, too, but before you change or delete classes you should make sure this is not harmful to the application(s) based on it.

To make a template and base a GUI application on it:

1.In the Windows Designer, open the application to be used as a template. Do this by specifying the application name at the -app switch on the command line, or by choosing File, Open Application from the menu bar. For example, the application name could be MYTEMP.
2.Make template specifications as desired. For example:

Modify the style guide.

Add dialog boxes.

Make generic adjustments to standard windows.

Define extra windows (but do not change them yet).

3.Generate a MYTEMP.ESI file, and start a new application named (for example) MYAPP, specifying MYTEMP as the template.
4.If you only want to re-use a selection of the GUI classes offered in the template, make or change the template's re-use selection.
5.Distribute the MYTEMP.ESI file to any other users that will be doing development work on this application.
6.Make application specifications as desired, then generate a MYAPP.ESI file.
7.When deploying the MYAPP application for production, distribute both the MYTEMP.ESI and MYAPP.ESI files to the end users.

You now have 2 levels of development. You could even create 3 or more levels. On each of these levels, the work of the other levels does not have to be fetched from the RDBMS. Work of higher levels is not needed, while work of lower levels is presented to you on file. At the same time, changes to the core level can quickly be checked for impact by combining the files that each level produces.

ESI template files interrelate like DLLs (they dynamically load each other when required), so you distribute them together and can replace them separately. Of course this only works if you respect the object-oriented principle of unchanged interfaces between these files.

When re-using ESI files in this way, you can change the properties of a class, but you should not delete or rename a class that is reused in another application. The other application refers to it by name and will no longer be able to find it. However, if all these applications are in the same repository as the conceptual schema, you can change the names in the conceptual schema. This type of change will cascade to all applications in that repository in the same way it does for a single application.

See Also:

How to Make or Change a Template's Reuse Selection

How to Work from ESI Flat Files When Developing a GUI