an introduction to the mda
DESCRIPTION
TRANSCRIPT
![Page 1: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/1.jpg)
An introduction to MDA
MDA presentation
Lai Duy Ha
![Page 2: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/2.jpg)
Outline
Motivation
The MDA framework
Case study – triathlon project
![Page 3: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/3.jpg)
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.
![Page 4: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/4.jpg)
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
![Page 5: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/5.jpg)
Motivation
My approach:
Using configuration data.
Validation.
Layout data.
Using template file & complier to generate code.
![Page 6: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/6.jpg)
Motivation
Challenge
The change of configuration data’s structure over time.
Need to re-construct the structure of configuration data.
![Page 7: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/7.jpg)
Outline
Motivation
The MDA framework
Case study – triathlon project
![Page 8: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/8.jpg)
Overview about MDA
Model driven architecture: was launched by the OMG in 2001.
![Page 9: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/9.jpg)
MDA development process
The artifacts are formal models (which can be understood by computers)
Models are the core at MDA
![Page 10: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/10.jpg)
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.
![Page 11: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/11.jpg)
What is a model?
![Page 12: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/12.jpg)
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.
![Page 13: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/13.jpg)
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
![Page 14: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/14.jpg)
Four-level metamodel hierarchy
![Page 15: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/15.jpg)
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, ....
![Page 16: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/16.jpg)
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.
![Page 17: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/17.jpg)
The complete MDA framework
![Page 18: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/18.jpg)
Outline
Motivation
The MDA framework
Case study – triathlon project
![Page 19: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/19.jpg)
Case study
The sample project is the enterprise system, which is used to tracking in triathlon race.
![Page 20: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/20.jpg)
Case study
System architecture:
In this case study, we only pay attention to the communication between client-server via restful service.
![Page 21: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/21.jpg)
Generator project
![Page 22: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/22.jpg)
Metamodel
![Page 23: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/23.jpg)
Model editor
![Page 24: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/24.jpg)
Template editor
![Page 25: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/25.jpg)
Generate code
![Page 26: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/26.jpg)
What’s next !!!
Buiding custom Domain Specific Language using Xtext.
Modeling Java Entrerprise System using mod4j.
![Page 27: An introduction to the MDA](https://reader033.vdocuments.site/reader033/viewer/2022051514/5495fabeac7959482e8b4f1a/html5/thumbnails/27.jpg)
References
Kleppe, A. G., J. Warmer, et al. 2003 MDA Explained: TheModel Driven Architecture: Practice and Promise, Addison-Wesley Longman Publishing Co., Inc