MDA
Model
driven
architecture
Väliohjelmistot - Lea Kutvonen
1
Contents









What is MDA?
Challenges for MDA
Program generation from models
MDA terminology
Basic modeling technology
Modeling language extensibility
Building a MDA application
Model transformations (information, activities)
About tools
Väliohjelmistot - Lea Kutvonen
2
What is MDA?

using modeling languages as declarative
progamming languages



rising of abstraction level for programmers
improved productivity, quality, longevity outlook
has been used to generate real-time and
embedded systems although term MDA
coined later


strategic direction of OMG as announced in 2002)
Java community process, ebxml, rosettanet using
similar concepts
Väliohjelmistot - Lea Kutvonen
3
Challenges for MDA

B2B and B2C integration needs of enterprises

Reguirement: Preserve investment


As enterprise borders shift requiring platform shift
As platforms themselves change





EJB 1.1 --> EJB 2.0
XML --> XML Schema
MTS --> COM+
CORBA 2.0 --> CORBA 3.0
Solution: Isolate information and processing logic from technology
specifics

Build platform independent models



UML is independent of CORBA, COM, EJB, XML, etc thus is well-suited as a
language for dexcribingn
Map these models to specific platforms
Maintain the separation at the implementation level
Väliohjelmistot - Lea Kutvonen
4
Enterprise and its boundaries
Frankel:2001
Väliohjelmistot - Lea Kutvonen
5
No Universal Component Middleware
Major Challenge!
CORBA
EJB
.NET
Väliohjelmistot - Lea Kutvonen
...
6
Integration communication
Frankel:2001
Väliohjelmistot - Lea Kutvonen
7
Enterprise system integration trend


”middleware” addresses integration within the
enterprise with a distributed computer
today aim for similar integration between
enterprises


Avoid typing in from computer-printouts
ebXML, .NET, RosettaNet and other Web
Services initiatives aim to be “the”
middleware to link enterprises

How to cope with them all?
Väliohjelmistot - Lea Kutvonen
8
Rising the level of abstraction

Part of general trend

Already well-established front and back ends


WYSIWYG GUI modeling and data modelign

Hand coding no longer predominatees
Early web-applications wired web front end directly to
back end



Some companies avoided building intermediate tiers
Web services and B2B require intermediate tiers to expose coarse
grained business services
Abstraction to allow reuse of the coarse grain business services via
various technologics.
Väliohjelmistot - Lea Kutvonen
9
Program generation from models



MDA is about using modeling languages as
programming languages rather than merely
as design languages
can improve productivity, quality, and
longetivity outlook
new term, old invention

CASE-tools in 1980’s, integrated object-oriented
development environments in 1990’s, UML tools,
etc.
Väliohjelmistot - Lea Kutvonen
10
Model Driven
Architecture
• New orientation for OMG activities
– New step beyond the Object
Management Architecture (OMA)
• Models are centric!
– Target middleware is not important!
• Focus on Platform Independent Models (PIM)
– Without middleware details
• Abstract Platform Specific Models (PSM)
– Including all middleware details
• Define PIM to PSM transformations
• Preserving PIM when new middleware appears!
Väliohjelmistot - Lea Kutvonen
11
Some Key Terms




Model
 A formal specification of the function, structure and/or
behavior of a system. (Model .ne. UML)
Platform
 Technological and engineering details that are
irrelevant to the fundamental functionality of a
software component.
Platform Independent Model (PIM)
 A formal specification of the structure and
function
of a system that abstracts away
technical details
(e.g., funds transfer)
Platform Specific Model (PSM)
 The technical details (CORBA, SOAP, EJB)
Väliohjelmistot - Lea Kutvonen
12
Basic modeling technology



UML – unified modeling language
MOF – meta object facility
XMI – XML metadata interchange
Väliohjelmistot - Lea Kutvonen
13
UML
•
IDL as abstraction very limited
– generates same level constructs, stubs and
skeletons
•
modeling languages – declarative?
– separation of abstract syntax from concrete
syntax
– invariants, pre- and postconditions
– precise action semantics and standard
mappings on various platforms
– mappings represent a standard engineering
solution for a collaboration concept
•
UML has defined profiles for introducing
separate sets of transformation rules
– to model particular domain, eg. business
information, busienss services,
collaborations, realtime systems, telecom
– to parametrize mapping to sepcific
technologies
•
class vs. behavioural models
Väliohjelmistot - Lea Kutvonen
14
MOF
M3
UML class,
UML association
UML attribute,
UML state,
M2:met
amodel
s
M1: models
MOF class,
MOF attribute,
MOF association
class ”customer”, …
table ”employee”, …
M0: objects and data
Väliohjelmistot - Lea Kutvonen
15
XMI - XML metadata interchange
Väliohjelmistot - Lea Kutvonen
16
Building an MDA Application
Platfor
mIndepe
ndent
Model
A Detailed Model,
stating Pre- and PostConditions in OCL,
and Semantics in
Action Language
Väliohjelmistot - Lea Kutvonen
Start with a PlatformIndependent Model
(PIM) representing
business functionality
and behavior,
undistorted by
technology details.
17
Generating Platform-Specific
Model
Platfor
mIndepe
ndent
Model
Map a PIM to Specific
Middleware
Technologies via OMG
Standard Mappings
CORBA
Model
Väliohjelmistot - Lea Kutvonen
MDA tool applies a
standard mapping to
generate PlatformSpecific Model (PSM)
from the PIM. Code is
partially automatic,
partially hand-written.
18
Mapping to Multiple
Deployment Technologies
Map a PIM to Many
Middleware
Technologies via OMG
Standard Mappings
Platfor
mIndepe
ndent
Model
CORBA
Model
Java/EJB
Model
XML/SOA
P
Model
Other
Model
MDA tool applies an
standard mapping to
generate PlatformSpecific Model (PSM)
from the PIM. Code is
partially automatic,
partially hand-written.
PSM can be viewed as
• presentation model (Web): data schemas, web comps, etc
• Business logic model (EJB): data schemas, key classes, etc
• Data models (DBMS): tables, columns, keys, etc
Väliohjelmistot - Lea Kutvonen
19
Generating Implementations
Map PSM to application
interfaces, code, GUI
descriptors, SQL
queries, etc.
Platfor
mIndepe
ndent
Model
CORBA
Model
CORBA
Java/EJB
Model
XML/SOA
P
Model
Other
Model
Java/EJB
XML/SOA
P
Other
Väliohjelmistot - Lea Kutvonen
MDA Tool generates all
or most of the
implementation code
for deployment
technology selected
by the developer.
20
Integrating Legacy & COTS
Reverse-engineer
existing application into
a model and redeploy.
Platfor
mIndepe
ndent
Model
Legacy
App
COTS
App
MDA Tools for reverse
engineering automate
discovery of models
for re-integration on
new platforms.
Other
Model
Other
Väliohjelmistot - Lea Kutvonen
21
Automating Bridges
Platfor
mIndepe
ndent
Model
CORBA
Model
MDA Tools
combine
application and
platform
knowledge to
generate bridges
CORBA
System
Interop
Bridge
XML/SOA
P
Model
Bridge generation is
simplified by common
application models,
simplifying creation of
integrated applications
both within and across
enterprises.
XML/SOA
P
System
Väliohjelmistot - Lea Kutvonen
22
Concepts: Refinement
Service Provisioning
Computation
independent
Platform
Billing
Component Independent
Business Model
Component Independent
Business Model
Platform Independent
Component view
Platform Independent
Component view
independent
Platform Specific
Väliohjelmistot - Lea Kutvonen
Platform Specific
23
Concepts: Patterns
B illing
S ervice P rovisioning
B u sin ess M o d el
P IM to
C o rb a
B u sin ess M o d el
P la tfo rm In d ep en d en t
P la tfo rm In d ep en d en t
P la tfo rm S p ecific
CORBA
P la tfo rm S p ecific
CORBA
Väliohjelmistot - Lea Kutvonen
24
Concepts: Packages
P a ck a g e P 1
S y ste m fro m v iew p o in t 1
P a ck a g e P 4
A b stra ctio n
P a ck a g e P 2
S y ste m fro m v iew p o in t 2
P a ck a g e P 5
R efin e m e n t R e la tio n
P a ck a g e P 3
In te rrela tio n sh ip b e tw ee n P 1 a n d P 2
(a)
(b )
P a ck a g e P 6
R ea liza tio n
Väliohjelmistot - Lea Kutvonen
25
MDA Example
Credit:
Väliohjelmistot - Lea Kutvonen
26
PIM, PSM, and
Transformations in MDA
Platform Independent Model
(PIM)
TRANSFORMATION RULES
Platform Specific
Model
(PSM)
Platform Specific
Model
(PSM)
Väliohjelmistot - Lea Kutvonen
27
PIM to PSM Transformation
Examples with MOF/XMI
UML Model (PIM)
XMI Document (PSM)
XMI
IDL, Java… (PSM)
<Auto>
<Color> Red </Color>
<Door> 4 </Door>
<Engine> 2 </Engine>
</Auto>
XMI DTD, Schema (PSM)
interface Auto
{
<!Element Auto
Class Auto
};
(Color*,
{public String color;
public int Door;
Door*,
public int Engine;
Engine*)>
}
Väliohjelmistot - Lea Kutvonen
28
Transformation Models in MDA
PIM
Software
Infrastructure
PIM
HealthCare
Business
Application
PSM
J2EE
.Ne
t
J2E
EPIM to PSM
Transformation
Model
Väliohjelmistot - Lea Kutvonen
PSM
.Net
29
Why New Component Models?

Often application designers want to use
concepts not present in PSM

e.g. CCM has no active JavaBeans properties
1) Creating a new PSM but also requires to
develop
the associated middleware

Very expensive and time consuming!!!
2) Creating a new PIM and defining PIM to PSM
transformation
rules- Lea Kutvonen
Väliohjelmistot
30
The Message Filtering
Example

A filter has





1 input for receiving messages to filter
Configurable filtering properties
1 filtering function
1 output for accepted messages
1 output for rejected messages
Filter
P1 = V1
P2 = V2
F = M.C1 == P1 or M.C2 > P2
Väliohjelmistot - Lea Kutvonen
O
K
N
O
31
Application = Assembling Filters
Väliohjelmistot - Lea Kutvonen
32
Problems

All must be done manually!







Defining OMG IDL for message eventtypes, filter component
and home types
Implementing CCM eventtypes, components and homes
Writing CCM XML descriptors
Extremely verbose, time consuming and error
prone!!!
How improving productivity and quality?
How dealing with thousand messages and filters?
How dealing with other Message Oriented
Middleware (MOM)?

Like EJB 2.0 message beans
Väliohjelmistot - Lea Kutvonen
33
Next Step on the Message Filtering
Meta-Model




Only allow definition of message and filter
types
Only generate OMG IDL types,
implementations, and CCM XML packaging
descriptors
Complete the meta model to describe filter
instances and connections between them
Then allow generation of CCM XML
assembling descriptors for automatic
deployment Väliohjelmistot - Lea Kutvonen
34
Drawback around
MDA-oriented Tools


Few MOF compliant tools to experiment the creation
of new component meta models!
Developing UML profiles are time and money
consuming



No portability of developed UML profiles between
UML Tools!!!
Few formalisms to express MDA transformation


UML Profile Builders are still expensive and proprietary
OMG RFP under work
Few PSM meta models for


Programming languages like Java, C++, …
Component standard middleware
Väliohjelmistot - Lea Kutvonen
35
MDA vs. CASE

CASE limitations

Mappings to implementation technologies
were proprietary



Risk to CASE customers too great
Very limited to extend specification language
MDA overcomes these limitations


Standardized mappings, for each domain
UML profiles and MOF
Väliohjelmistot - Lea Kutvonen
36
Kirjallisuutta


Siegel, Jon, Developing in OMG’s Model-Driven
Architecture. Object Management Group White Paper,
Nov 2001.ftp://ftp.omg.org/pub/docs/omg/01-1201.pdf (pakkollinen)
OMG Architecture Board, Model Driven Architecture
(MDA), Jul 2001, ORMSC/2001-07-01
http://cs.ua.edu/630/Resources/MDA%20White%20P
apers/MDA%20-%20Technical%20Perspective%20%20OMG%20Board%20-%20ormsc-01-07-01.pdf
(täydentävä)
Väliohjelmistot - Lea Kutvonen
37
Varhaisia välineitä




iUML, ICCG www.kc.com
Adaptive framework www.adaptive.com
www.kabira.com
ArchStyler (in Borland’s Enterprise
studio 2) www.io-software.com
Väliohjelmistot - Lea Kutvonen
38
Descargar

MDA Model driven architecture