How does CrossGenerate work

How does CrossGenerate work?

CrossGenerate produces working software based on three inputs: a model, a template and a config.

In this section the different inputs and the generation process are explained.

Model

For CrossGenerate the model can be seen as the functional specification of the software that needs to be generated. A model can contain several types of information, such as:

  • The target datamodel to be generated (tables, columns, relations)
  • Data mappings from source to target models
  • Business rules that need to be applied

A model can be constructed using different tools.

  • By querying the system catalog of a source database for table structures.
  • Using modeling tools such as Sap/Sybase PowerDesigner
  • By using a custom made modeling tool, for instance a metadata database or Excel files.

The modeling tool used largely determines how much can be generated using CrossGenerate. A modeling tool that can specify data mappings and business rules provides for a much higher degree of automation than a modeling tool or approach that only specifies target model structure.
CrossGenerate’s only requirement with regards to the modeling tool used, is that the model can be provided to CrossGenerate in an XML file.

Template

The template for generating is the file that  contains the original source code or technical pattern that, combined with information from the model, should result in working software.
A typical example of a template would be a DDL script to create a table for the staging database, or an ETL package to load data a source system to the staging database.

CrossGenerate supports two types of template:

  • Text
  • XML

For more information on the template types and the options that exist for each template, please read the documentation.

Config

The configuration for CrossGenerate is designed to be the glue between model and template. It contains information about the template, the model and how they are to be combined in generation (binding).

Generation process

When CrossGenerate is invoked with a model, template and config as input, it performs the following three steps:

  • Preprocessing of the model
  • Preprocessing of the template
  • Combining model and template to generate software

Below is a graphical illustration of this process.

Example

For a simple example of the inputs and the expected outcome, please see the example.

For more examples, please consult the documentation.

More?

Do you want to receive more information, or are you interested in seeing the generator in action then please contact us.