Väliohjelmistot - Lea Kutvonen 1 MDA Model driven architecture.
-
Upload
jade-underwood -
Category
Documents
-
view
220 -
download
0
Transcript of Väliohjelmistot - Lea Kutvonen 1 MDA Model driven architecture.
Väliohjelmistot - Lea Kutvonen 2
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 3
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 4
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 6
No Universal Component Middleware
CORBA EJB .NET . . .
Major Challenge!
Väliohjelmistot - Lea Kutvonen 8
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 9
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 10
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 11
• 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!
Model Driven Architecture
Väliohjelmistot - Lea Kutvonen 12
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 13
Basic modeling technology UML – unified modeling language MOF – meta object facility XMI – XML metadata interchange
Väliohjelmistot - Lea Kutvonen 14
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 15
MOF
M2:metamodels
M1: models
M0: objects and data
M3MOF class, MOF attribute,MOF association
class ”customer”, …table ”employee”, …
UML class,UML associationUML attribute,UML state,
Väliohjelmistot - Lea Kutvonen 17
Building an MDA Application
Start with a Platform-Independent Model (PIM) representing business functionality and behavior, undistorted by technology details.
Platform-
IndependentModel
A Detailed Model, stating Pre- and Post-Conditions in OCL, and Semantics in Action Language
Väliohjelmistot - Lea Kutvonen 18
Generating Platform-Specific Model
Platform-
IndependentModel
Map a PIM to Specific Middleware
Technologies via OMG Standard Mappings
MDA tool applies a standard mapping to generate Platform-Specific Model (PSM) from the PIM. Code is partially automatic, partially hand-written.CORBA
Model
Väliohjelmistot - Lea Kutvonen 19
Mapping to Multiple Deployment Technologies
Platform-
IndependentModel
CORBA Model
MDA tool applies an standard mapping to generate Platform-Specific Model (PSM) from the PIM. Code is partially automatic, partially hand-written.Java/EJB
Model
XML/SOAPModel
OtherModel
Map a PIM to Many Middleware
Technologies via OMG Standard Mappings
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 20
Generating Implementations
Platform-
IndependentModel
CORBA Model
MDA Tool generates all or most of the implementation code for deployment technology selected by the developer.
Java/EJBModel
CORBA
XML/SOAPModel
Java/EJBXML/SOAP
Other
OtherModel
Map PSM to application interfaces, code, GUI
descriptors, SQL queries, etc.
Väliohjelmistot - Lea Kutvonen 21
Integrating Legacy & COTS
Platform-
IndependentModel
LegacyApp
MDA Tools for reverse engineering automate discovery of models for re-integration on new platforms.
COTSApp
Other
OtherModel
Reverse-engineer existing application into a model and redeploy.
Väliohjelmistot - Lea Kutvonen 22
Automating Bridges
CORBA Model
XML/SOAPModel
Platform-
IndependentModel
CORBA System
XML/SOAP
SystemInteropBridge
MDA Tools combine
application and platform
knowledge to generate bridges
Bridge generation is simplified by common application models, simplifying creation of integrated applications both within and across enterprises.
Väliohjelmistot - Lea Kutvonen 23
Concepts: Refinement
Billing
Platform Specific
Component Independent
Business Model
Platform Independent
Component view
Platform Specific
Component Independent
Business Model
Platform Independent
Component view
Service Provisioning
Platform Specific
Component Independent
Business Model
Platform Independent
Component view
Service Provisioning
Platform Specific
Component Independent
Business Model
Platform Independent
Component view
Computation
independent
Platform
independent
Väliohjelmistot - Lea Kutvonen 24
Concepts: Patterns
Billing
Platform SpecificCORBA
Business Model
Platform Independent
Platform SpecificCORBA
Business Model
Platform Independent
Service Provisioning
Platform SpecificCORBA
Business Model
Platform Independent
PIM toCorbaPIM toCorbaPIM toCorba
Väliohjelmistot - Lea Kutvonen 25
Concepts: Packages
Package P1System from viewpoint 1
Package P2System from viewpoint 2
Package P3Interrelationship between P1 and P2
Package P4Abstraction
Package P5Refinement Relation
Package P6Realization(a) (b)
Väliohjelmistot - Lea Kutvonen 27
PIM, PSM, and Transformations in MDA
TRANSFORMATION RULES
Platform Specific Model(PSM)
Platform Independent Model(PIM)
Platform Specific Model(PSM)
Väliohjelmistot - Lea Kutvonen 28
PIM to PSM TransformationExamples with MOF/XMI
UML Model (PIM)
Auto
Color : StringDoor : IntegerEngine : Integer
<Auto> <Color> Red </Color> <Door> 4 </Door> <Engine> 2 </Engine></Auto>
XMI Document (PSM)
XMI
<!Element Auto (Color*, Door*, Engine*)>
XMI DTD, Schema (PSM)X
MI
MO
F
interface Auto { };
IDL, Java… (PSM)
Class Auto {public String color; public int Door; public int Engine; }
Väliohjelmistot - Lea Kutvonen 29
Transformation Models in MDA
PIM Software
InfrastructurePSMJ2EE
PIM HealthCare
BusinessApplication
(CIAS)
UML
UML
.Net
PIM to PSMTransformation
Model
J2EE
PSM.Net
UML.Net
UML4EJ
B
Väliohjelmistot - Lea Kutvonen 30
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
Väliohjelmistot - Lea Kutvonen 31
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 messagesFilter
P1 = V1P2 = V2
F = M.C1 == P1 or M.C2 > P2
OK
NO
Väliohjelmistot - Lea Kutvonen 33
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 34
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 35
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 UML Profile Builders are still expensive and
proprietary No portability of developed UML profiles
between UML Tools!!! Few formalisms to express MDA transformation
OMG RFP under work Few PSM meta models for
Programming languages like Java, C++, … Component standard middleware
Väliohjelmistot - Lea Kutvonen 36
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 37
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-12-01.pdf (pakkollinen)
OMG Architecture Board, Model Driven Architecture (MDA), Jul 2001, ORMSC/2001-07-01 http://cs.ua.edu/630/Resources/MDA%20White%20Papers/MDA%20-%20Technical%20Perspective%20-%20OMG%20Board%20-%20ormsc-01-07-01.pdf
(täydentävä)