Introduction to MDA (Model Driven Architecture) CYT.

33
Introduction to MDA (Model Driven Architecture) CYT

Transcript of Introduction to MDA (Model Driven Architecture) CYT.

Introduction to MDA (Model Driven Architecture)

CYT

2

Outline

• MDA Overview

• Support of OMG’s Techniques

• Model Transformation

• Building MDA Application

• Conclusion

3

MDA Overview• Several middleware

CORBA COM/DCOM/MTS Java/EJB XML/SOAP C#/.Net

• Middleware war

• MDA is language, vendor and middleware-neutral

• MDA focuses primarily on the functionality and behavior of a system.

4

MDA Overview (cont’d)• An approach to IT system specification that separates the specification

of system functionality from the specification of the implementation of that functionality on a particular technology platform

• “Design once, build it on any platform”

• A model is a formal specification of the function, structure and/or behaviour of a system

• The biggest benefit of MDA is the generation of application code from an MDA model through an automated or semi-automated series of steps.

• Goal: to maximize automation of the mapping step.

5

MDA Overview (cont’d)• CIM• PIM• PSM

6

MDA metamodelMDA metamodel

MOF

Other languages

UML

Metamodel

PIM Mapping techniques

PSM Mapping techniques

PIM

PSM

Infrastructure

<<expressed <<expressed with>>with>>

<<expressed <<expressed with>>with>>

<<expressed <<expressed with>>with>>

<<based <<based on>>on>>

1..n1..n

<<based <<based on>>on>>

1..n1..n

Refactoring Refactoring from PSM to from PSM to PIMPIM

<<described <<described with>>with>>

1..n1..n

<<described <<described with>>with>>

1..n1..n

Mapping Mapping from PIM to from PIM to PIMPIM

1..n1..n

Mapping Mapping from PIM to from PIM to PSMPSM

1..n1..n

Mapping Mapping from PSM to from PSM to PSMPSM

1..n1..n

<<depends <<depends on>>on>>

<<independant <<independant of>>of>>

7

Support of OMG’s Technique• MOF: Meta-Object Facility

Integrated Repository Standard MetaModel

• XMI: XML Metadata Interchange Model & MetaModel Interchange XML-Based Format, including DTDs

• UML: Unified Modeling Language UML 1.4 World Standard for A&D Representation for Structure, Dynamics, Deployment

• CWM: Common Warehouse Metamodel Data Warehousing Integration Record, Table formats; Data Loading & Transformation

8

MOF

• The MOF defines the dictionary of model elements, as an abstract model called a meta-metamodel

• This common dictionary enables model exchange from one tool to another

• The MOF also defines a standard distributed repository

• A necessary foundation for modeling

9

MOF (cont’d)

• CLASSES, with Attributes and Operations at both Object and Class level

• ASSOCIATIONS support binary links between class instances

• PACKAGES are collections of related Classes and Associations

• DATATYPES represent non-object types as Parameters or Attributes

• CONSTRAINTS associate semantic restrictions with other elements

10

XMI

• OMG-Standardized format for exchange of models (and meta-models)

• XML-based transport

• MOF-based schema for compactness without ambiguity

• Exchange UML models among tools and repository

11

UML

• Visualizing Using the standardized graphic UML displays

• Specifying Semantics to define

static structuredynamic behaviormodel organization

• Constructing Map UML to Programming Environment and Generate some code A

utomatically

• Documenting Every phase of lifecycle from analysis and design through deployme

nt and maintenance

12

CWM• OMG’s data warehouse standard

• Enable easy interchange of warehouse and business intelligence metadata between

warehouse tools warehouse platforms and metadata repositories

in distributed heterogenous environments.

• Defined using MOF

13

OMG Four Layer Standard Modeling Stack

14

15

Model Transformation• Mappings

Mapping is defined as a set of rules and techniques used to modify one model in order to get another model

Mappings are described using UML

• Refining Makes a model less abstract Permits “zooming” in (and out of) a model:

16

PIM to PIM Mapping• Used when models are enhanced, refined or filtered during t

he development lifecycle without needing any platform dependant information

17

PIM to PSM Mapping• This transformation is used when the PIM is projected to the

execution infrastructure

• Projection is based on platform characteristics

• These characteristics should be described using a UML description (and eventually a profile for describing common platform concepts)

18

PSM to PSM Mapping

19

PSM to PIM Refactoring

20

MDA Features

21

MDA brings Consistent RelationshipsClear relationship relating different models– Platform independent components to platform specific models – a refinement (“vertical”) mapping– Business model to Platform independent components – a refinement mapping– Business area A to Business area B to model the overlap – a “horizontal” model integration– Interface A to interface B of the same component – a “horizontal” model integration

22

MDA brings Shared Standard MappingsStandardized mappings and patterns for platform-specific model generators– These generic mappings and patterns are defined in shared packages– A specific application uses (perhaps is even generated from) the shared package

23

MDA brings Improved PortabilitySimpler to re-target platform-independent to different platform targets– Common mappings to different target platforms

24

MDA brings Shared Standard Patterns• Common patterns at any level of modeling– The idea of common patterns applies to models of business, components, platforms, mappings

25

MDA Integrates Across Computing Platform• Pervasive Services = Common platform-independent model of platform services• Leverages shared standard mappings to platform-specific realizations of services

26

Software Development Lifecycle

27

Building an MDA Application Lifecycle

UML MOF CWM

TimeTime

PIM to PIM PIM to PIM mappingsmappings

PIM to PSM PIM to PSM mappings mappings

(projection on (projection on a specific a specific platform)platform)

PSM to PSM to PSM PSM

mappingsmappings

28

MDA-based Application Development• The process involves three steps:

Step 1: Build a Platform Independent Model (PIM)

Step 2: Map this model into a Platform Specific Model (PSM)

Step 3: Generate Code that can be deployed and run

UMLMultiple level of PIMs

UMLMultiple level of PIMs

PIM stored in MOFMapping tools

UML(UML profile)

PIM stored in MOFMapping tools

UML(UML profile)

platformstools

platformstools

29

Platform-Independent

Model

Start with a Platform-Independent Model (PIM), in UML and defined at multiple levels.

Base level PIM represents only business functionality and behavior, undistorted by technology details.

Next level adds, e.g., general aspects of components or asynch comms.

A Detailed Model, stating Pre- and Post-Conditions in OCL, and Semantics in Action Language

Building an MDA Application

30

CORBA Model

Platform-Independent

Model

MDA tool applies an OMG™-standard Mapping – formally, a UML Profile – to generate a Platform-Specific Model (PSM) from the PIM.

This model, like the PIM, will be very detailed.

This step may require hand-editing, depending on the tool and environment

OMG Standard Mappings – UML

Profiles – Map a PIM to Middleware

Technologies

Building an MDA Application (cont’d)

31

CORBA Model

Java/EJBModel

XML/SOAPModel

OtherModel

Platform-Independent

Model

OMG will standardize – and MDA tools will implement – mappings to multiple middleware platforms.

Each mapping – formally, a UML profile – defines the route from an application’s single PIM to a PSM on a target platform.

OMG Standard Mappings – UML

Profiles – Map a PIM to Middleware

Technologies

Building an MDA Application (cont’d)

32

CORBA Model

Java/EJBModel

XML/SOAPModel

OtherModel

Platform-Independent

Model

MDA Tools Generate Application Interfaces, Code, and Other Files

from each PSM

A PSM contains basically the same information as an application, but expressed in UML instead of code.

MDA development tools can generate all or most of an application from a PSM: interfaces, templates, configuration files, more.

CORBA Impl

Java/EJBImpl

XML/SOAPImpl

OtherImpl

Building an MDA Application (cont’d)

33

Conclusion• Model

• Model Transformation

• Auto-Generation

• Model Driven Architecture Development Methodology Guidelines Tools Transformation rules UML profile