Generating source code from UML models

You can use transformations to create source code from a UML model. First you must create a transformation parameters file and then apply those parameters to a model.
In general, model-driven development follows these steps:
  1. Model the application with a UML model, a markup-language document that describes the functionality of an application at a high level.
  2. Choose transformations for the UML model. The transformations you choose decide both the language of the output code and the parts of the UML model that are chosen for transformation.
  3. Create a transformation parameters model (TPM) file, which is a file tied to the UML model that describes how to translate the UML elements into elements in the source language. The TPM file contains information such as how to convert types and names into the source language, and how the output code should be structured.
  4. Run the transformations and create code in the output language.
  5. Edit and implement the output code.
You may iterate through this cycle several times, either to generate different parts of the application or to test and debug the application. For example, you might transform the data definition portions of the model first to apply that portion of the model to the target data source. Later, you might generate the data access portions of the model to begin coding business logic to work with that database.

Feedback