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:
- Model the application with a UML model,
a markup-language document that
describes the functionality of an application at a high level.
- 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.
- 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.
- Run the transformations and create code in the
output language.
- 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.