MDA Style Transforms
MDA transforms provide a fully configurable way of converting model elements and model fragments from one domain to another. This will typically involve converting Platform-Independent Model (PIM) elements to Platform-Specific Model (PSM) elements. A single element from the PIM may be responsible for creating multiple PSM elements across multiple domains.
Transformations are a huge productivity boost , and reduce the need to manually implement stock classes and elements for a particular implementation domain - for example database tables generated from persistent PIM classes. EA includes some basic transformations built in, such as PIM to Data Model, PIM to C#, PIM to Java and PIM to XSD. Sparx will make additional transformations available over time - either as built in transformations, or as downloadable modules from the Sparx website.
A Transformation is defined using the same simple code generation template language that has been in EA for some years now, and involves no more than writing a template to create a simple intermediary source file. EA reads the source file and binds that to the new PSM.
EA also creates internal bindings between each PSM created and the original PIM. This is essential, as it allows you to forward synchronize from the PIM to the PSM many times, adding or deleting features as you go. So for example, adding a new attribute to a PIM class can be forward synchronized to a new column in the Data Model.
EA will not delete or overwrite any element features that were not originally generated by the transform. So you can add new methods to your elements, and EA will leave them alone during the forward generation process.
Transformations that are currently built in include:
- DDL - Transforms platform-independent class elements to platform-specific table elements.
- EJB Entity - Transforms platform-independent class elements to packages containing the class and interface elements that comprise an EJB Entity Bean.
- EJB Session - Transforms platform-independent class elements to packages containing the class and interface elements that comprise an EJB Session Bean.
- Java - Transforms platform-independent elements to Java language elements.
- C# - Converts a PIM to a standard C# implementation set.
- XSD - Transforms platform-independent elements to XSD elements.
EA's MDA-style transformations re-use the functionality of the Code Generation Templates (CGT) to create fully configurable Transformation Templates.
Transformations are described in the following sections:
The following diagrams highlight how Transforms work and how they can significantly boost your productivity: