an introduction to the mda
DESCRIPTION
TRANSCRIPT
An introduction to MDA
MDA presentation
Lai Duy Ha
Outline
Motivation
The MDA framework
Case study – triathlon project
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.
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
Motivation
My approach:
Using configuration data.
Validation.
Layout data.
Using template file & complier to generate code.
Motivation
Challenge
The change of configuration data’s structure over time.
Need to re-construct the structure of configuration data.
Outline
Motivation
The MDA framework
Case study – triathlon project
Overview about MDA
Model driven architecture: was launched by the OMG in 2001.
MDA development process
The artifacts are formal models (which can be understood by computers)
Models are the core at MDA
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.
What is a model?
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.
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
Four-level metamodel hierarchy
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, ....
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.
The complete MDA framework
Outline
Motivation
The MDA framework
Case study – triathlon project
Case study
The sample project is the enterprise system, which is used to tracking in triathlon race.
Case study
System architecture:
In this case study, we only pay attention to the communication between client-server via restful service.
Generator project
Metamodel
Model editor
Template editor
Generate code
What’s next !!!
Buiding custom Domain Specific Language using Xtext.
Modeling Java Entrerprise System using mod4j.
References
Kleppe, A. G., J. Warmer, et al. 2003 MDA Explained: TheModel Driven Architecture: Practice and Promise, Addison-Wesley Longman Publishing Co., Inc