an introduction to the mda

27
An introduction to MDA MDA presentation Lai Duy Ha

Upload: lai-ha

Post on 18-Dec-2014

704 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: An introduction to the MDA

An introduction to MDA

MDA presentation

Lai Duy Ha

Page 2: An introduction to the MDA

Outline

Motivation

The MDA framework

Case study – triathlon project

Page 3: An introduction to the MDA

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

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

Motivation

My approach:

Using configuration data.

Validation.

Layout data.

Using template file & complier to generate code.

Page 6: An introduction to the MDA

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

Outline

Motivation

The MDA framework

Case study – triathlon project

Page 8: An introduction to the MDA

Overview about MDA

Model driven architecture: was launched by the OMG in 2001.

Page 9: An introduction to the MDA

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

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

What is a model?

Page 12: An introduction to the MDA

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

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

Four-level metamodel hierarchy

Page 15: An introduction to the MDA

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

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

The complete MDA framework

Page 18: An introduction to the MDA

Outline

Motivation

The MDA framework

Case study – triathlon project

Page 19: An introduction to the MDA

Case study

The sample project is the enterprise system, which is used to tracking in triathlon race.

Page 20: An introduction to the MDA

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

Generator project

Page 22: An introduction to the MDA

Metamodel

Page 23: An introduction to the MDA

Model editor

Page 24: An introduction to the MDA

Template editor

Page 25: An introduction to the MDA

Generate code

Page 26: An introduction to the MDA

What’s next !!!

Buiding custom Domain Specific Language using Xtext.

Modeling Java Entrerprise System using mod4j.

Page 27: An introduction to the MDA

References

Kleppe, A. G., J. Warmer, et al. 2003 MDA Explained: TheModel Driven Architecture: Practice and Promise, Addison-Wesley Longman Publishing Co., Inc