3. Motivation
Boring code cause by:
Follow templates or coding style guide.
The consistent of the system.
The benefit of maintaining.
Disadvantage
Reduce inspiration of developers.
Silly copy/paste code.
4. Motivation
Example of one normal module:
Insert, update, delete record in one table.
Each field has its own validation.
Field’s presentation (type of control, row, column,….)
etc…
One system may contains more than 20+ modules like this
5. Motivation
My approach:
Using configuration data.
Validation.
Layout data.
Using template file & complier to generate
code.
6. Motivation
Challenge
The change of configuration data’s structure over
time.
Need to re-construct the structure of configuration
data.
9. MDA development process
The artifacts are
formal models
(which can be
understood by
computers)
Models are the core
at MDA
10. What is a model?
A model is always an abstraction of
something that exists in reality.
A model is different from the thing it
models, e.g., details are left out or its
size is different.
A model can be used as an example to
produce something that exists in reality.
A model is a description of (part of) a system
written in a well-defined language.
12. How the models are created?
Formally, they are based on a
metamodel.
A metamodel is simply a model of a
modeling language. It defines the
structure, semantics, and constraints
for a family of models.
13. How the models are created?
Because a metamodel is also a model, a
metamodel itself must be written in a well-
defined language. This language is called a
metalanguage
15. Transformation
While the models can be considered as the core of MDA.
The most important feature, that makes the MDA
different from the traditional process, is the
transformation.
There are two types of transformation:
Model 2 model:
QVT, ALT.
Model 2 code:
using template engine such as: Velocity, Acceleo, Xpand, ....
16. Transformation
A transformation definition is a set of
transformation rules that together describe
how a model in the source language can be
transformed into a model in the target
language.
26. What’s next !!!
Buiding custom Domain Specific
Language using Xtext.
Modeling Java Entrerprise System
using mod4j.
27. References
Kleppe, A. G., J. Warmer, et al. 2003 MDA Explained:
TheModel Driven Architecture: Practice and Promise,
Addison-Wesley Longman Publishing Co., Inc