HistoryViewLinks to this page 2012 September 7 | 02:27 pm

In this scenario a model of a specific domain is used to generate a code base for an application or system. This example used the classic model-view-controller architectural pattern. In our approach there are 2 major areas of development:

  1. Using a model to generate data controller objects
  2. Using design document to generate views, i.e. the user interfaces

The major artifacts in the first area include a model, code templates, and the output of a code generator.

First a meta-data model is created to describe the data to be used by the system. Once the model is in place, code automation techniques are used to generate base data objects and interfaces to the data objects. A code template is created to define the output of a code generation engine. The model is then used as an input to the engine which then utilizes the templates to automatically create the desired output code files. The template defines the structure and content of the generated files. This creates the controller piece of the system.

Next we use a form to “design” the user interface. Here we’ve modeled the interface to provide a specification sheet to the designers / developers. Developers fill out the specification sheet based on based on the meta-data model created earlier. This design document will define the user interface forms, controls, actions, and interfaces to the data controllers. Once the form is completed code automation techniques are used once again to create the desired output of code files. In this case templates were not used. Instead this functionality of defining the structure and content of the output was built directly into the form application.

The last step is to compile all generated code with any non-generated code need for support into the final system.

These steps are then iterated over as the model is normalized for the domain. This process also applies to defect fixing for the system.