1model driven architecture – 3. märz 2008 – siegfried nolte 1.uml – what is it and what is it...

29
Model Driven Architecture – 3. März 2008 – Siegfried Nolte 1 1. UML – What is it and what is it good for ? 2. MDA – What is it and what is it good for ? 3. MDA – Sample Process 4. QVT – A View into Transformation MDA and Application Development– a Vision Agenda

Upload: donavan-conley

Post on 11-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 1

1. UML – What is it and what is it good for ?

2. MDA – What is it and what is it good for ?

3. MDA – Sample Process

4. QVT – A View into Transformation

MDA and Application Development– a Vision

Agenda

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 2

1. UML – What is it and what is it good for ?

2. MDA – What is it and what is it good for ?

3. MDA – Sample Process

4. QVT – A View into Transformation

Agenda

MDA and Application Development

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 3

• UML is a language, it is not a method

• UML is a specification of the OMG → so it may be/is a standard

• UML is unified → it contains many concepts to describe many aspects of the real world in models

• UML is a language based on MOF → it is fully MOF compliant

• UML and OCL belong together → defining constraints is part of modeling

MDA

UML - Motivation

UML – what it is

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 4

UML

Objects, Relationships, Processes, Rules,

Constraints, ...

Datastructures,Programcode, Configuration,

...

The Real World Natural Languages, Domain Languages, Specific Modeling Languages

The Computer World Implementation Languages, Databases, Application Server, …

UML - Motivation

UML – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 5

UML

Objects, Relationships, Processes, Rules,

Constraints, ...

Analysis

Design

The Real World Natural Languages, Domain Languages, Specific Modeling Languages

Objects, Relationships, Processes, Rules,

Constraints, ...

Datastructures,Programcode, Configuration,

...

Construction –Datastructures,Programcode, Configuration,

...

The Computer World Implementation Languages, Databases, Application Server, …

UML - Motivation

UML – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 6

UML

Objects, Relationships, Processes, Rules,

Constraints, ...

Design

UML (/ BPMN)

UML

The Real World Natural Languages, Domain Languages, Specific Modeling Languages

Objects, Relationships, Processes, Rules,

Constraints, ...

Datastructures,Programcode, Configuration,

...

Construction – Datastructures,Programcode, Configuration,

...

Analysis

The Computer World Implementation Languages, Databases, Application Server, …

UML - Motivation

UML – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 7

1. UML – What is it and what is it good for ?

2. MDA – What is it and what is it good for ?

3. MDA – Sample Process

4. QVT – A View into Transformation

Agenda

MDA and Application Development

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 8

• MDA is - like UML and OCL - a specification of the OMG

• MDA is not a language and not a method → it is a concept

• MDA is an approach for model-driven development of architectures

• MDA is not primarily an approach for developing software

• MDA is based on other OMG concepts like UML2, OCL, QVT, MOF

MDA

MDA - Motivation

MDA – what it is

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 9

CIM - Computation Independet Modeling

PIM - Platform Independet Modeling

PSM - Platform Specific Modeling

IM - Implementation Modeling

(C - and of course coding, instead this is not a MDA abstraction layer)

MDA

One of the basic ideas – thinking in abstraction layers

MDA - Motivation

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 10

M3 - Meta-Metamodel, the concepts and elements for modeling metamodels, f.e. the UML2 Class Diagram and OCL

M2 - Metamodel, a formal model for a modeling language, f.e. the specification of UML2

M1 - Model, f.e. some UML model of an aspect of the real world

M0 - Instances in the real world, f.e. objects, actions, states, communication

MDA

Another basic idea – thinking in model and metamodel layers

MDA - Motivation

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 11

• A (necessary) pre-condition for MDA: formal models, based on UML-Metamodels

• Example: all UML-modeltypes are based on UML-Metamodels these are formal models

MDA

MDA - Motivation

Yet the „most“ basic idea – doing the application development with models

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 12

MDA

Analysis

Design

CIM: natural languages, specific modeling languages, BPMN

PIM: UML

PSM: UML

IM: implementation models(JMI, CMI, EJB, ...)

Objects, Relationships, Processes, Rules,

Constraints, ...

Construction: Datastructures,Programcode, Configuration,

...

MDA - Motivation

MDA – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 13

MDA

CIM: BPMN

PIM: UML

PSM: UML

IM: JMI, CMI, ...

1. Modeling

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

Construction: Datastructures,Programcode, Configuration,

...

MDA - Motivation

MDA – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 14

MDA

CIM: BPMN

PIM: UML

PSM: UML

IM: JMI, CMI, ...

2. Transformation

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

Construction: Datastructures,Programcode, Configuration,

...

MDA - Motivation

MDA – what it is good for

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 15

1. UML – What is it and what is it good for ?

2. MDA – What is it and what is it good for ?

3. MDA – Sample Process

4. QVT – A view into transformation

Agenda

MDA and Application Development

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 16

MDA

CIM: BPMN

1. Step: Requirement Analysis

Description of the real world‘s aspects, circumstances and conditions using natural language or some domain language. Modeling with domain relevant models, f.e. BPMN

Modeling Objects, Relationships, Processes, Rules,

Constraints, ...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 17

MDA

CIM: BPMN

PIM: UML

2. Step: Transformation

Transfer of CIM models into the next layer, f.e. transfer of BPMN-models into UML Activity-Diagrams

Transformation

Analysis

Objects, Relationships, Processes, Rules,

Constraints, ...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 18

MDA

PIM: UML

Modeling

3. Step: Analysis – domain specific system definition

modeling of domain circumstances in formal models; distinction between structure and behavior

Analysis

Objects, Relationships, Processes, Rules,

Constraints, ...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 19

MDA

PIM: UML

PSM: UML

Transformation4. Step: Transformation

Transfer of formal domain models into platform-specific models

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 20

MDA

PSM: UML

Modeling

5. Step: IT-specific modeling – IT concept

Specification of the application concerning to DP, platform-specific aspects, f.e. J2EE or .NET.Refinement and concretizing of the architectures, i.e. UML class diagrams into ERM.

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 21

MDA

PSM: UML

IM: JMI, CMI, ...

Transformation

6. Step: Transformation into implementation model

Transfer of platform specific models into implementation models (code, data structures, DB schemes, ...)

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

Construction: Datastructures,Programcode, Configuration,

...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 22

MDA

IM: JMI, CMI, ...

Modeling

7. Step: Implementation modeling

Modeling in the IM layer means working on the technical concepts with models and languages of the concrete DP environment;coding, building, constructing, configuring, …

Analysis

Design

Objects, Relationships, Processes, Rules,

Constraints, ...

Construction: Datastructures,Programcode, Configuration,

...

MDA - Process

MDA – let‘s drive models from the real world to applications

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 23

1. UML – What is it and what is it good for ?

2. MDA – What is it and what is it good for ?

3. MDA – Sample Process

4. QVT – A View into Transformation

Agenda

MDA and Application Development

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 24

QVT is - like UML and OCL - a specification of the OMG

QVT describes a concept and languages for Model-to-Model transformation

QVT languages are seperated into a descriptive one – Relations Language – and an imperative one – Operational Mappings

QVT languages are based on a Core Language, that is something like a „virtual mapping machine“

QVT is developed from OCL so transformation mappings are more or less OCL-expressions

QVT

Query View Transformation

QVT – what it is

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 25

QVT - Architektur

QVT

OperationalMappings

Relation to CoreTransformation

Core Language

BlackBox

Relations Language

Query View Transformation

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 26

QVT

Query View Transformation

A simple sample model

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 27

QVT

A transformation with Relations Language

/* * transform a UMl package into a ERM schema */transformation HelloWorld ( source : UML, target : ERM ) { top relation SourceToTarget { packageName : String; checkonly domain source sourcePackage : UML::Package { name = packageName }; enforce domain source targetSchema : ERM::Schema { name = packageName }; }}

Query View Transformation

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 28

/* * transform a UM package into a ERM schema */ transformation HelloWorld ( in source : UML, out target : ERM );

main() { source.objects()[Package]->map createHello();}

mapping Package::createHello () : Schema{ name := "HelloWorld"; -- Erzeugung eines Schemas namens 'HelloWorld‚

end { log ("Hello, World!"); } –- log-Ausgabe auf der Konsole}

QVT

Query View Transformation

A transformation with Operational Mapping

Model Driven Architecture – 3. März 2008 – Siegfried Nolte 29

QVT

Query View Transformation