Model Driven Architecture - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Model Driven Architecture

Description:

IDEs & Modeling Tools. Focus on Roundtrip Engineering. Growing support for dynamic stuff ... Patterns already supported by IDEs. Generation of constraint checks ... – PowerPoint PPT presentation

Number of Views:239
Avg rating:3.0/5.0
Slides: 38
Provided by: csB8
Category:

less

Transcript and Presenter's Notes

Title: Model Driven Architecture


1
Model Driven Architecture
  • Pankaj Joshi
  • Based on presentation by
  • R.M. Soley, CEO OMG
  • and
  • Johann Oberleitner, Vienna University of
    Technology

2
Heterogeneity is Permanent
  • Programming languages
  • 3 million COBOL programmers
  • 1.6 million VB programmers
  • 1.1 million C/C programmers
  • Operating systems
  • Unix, MVS, VMS, MacOS, Windows, PalmOS
  • Embedded devices (mobile, set-top, pSOS, VXWorks,
    etc.)
  • Networks
  • Ethernet, ATM, IP, SS7, Firewire, USB
  • Bluetooth, 802.11b, HomeRF

3
Where Can We Agree?
  • There will not be consensus on hardware platforms
  • There will not be consensus on operating systems
  • There will not be consensus on network protocols
  • There will not be consensus on programming
    languages
  • There must be consensus on interfaces and
    interoperability!

4
Goal of OMG
  • Develop an architecture, using object technology,
    for distributed application integration.
  • Specifications freely available
  • Implementations exist
  • Member-controlled not-for-profit

5
How Can We Protect Software Investment?
  • The problem remains
  • Tracking the next best thing
  • Protecting your investment in existing software
    base
  • Retaining qualified staff
  • Maintaining existing code base

6
The Model Driven Architecture
  • Provides opportunity to increase your bottom line
    by integrating your assets
  • Industry standards support that goal by
    future-proofing your application design
  • The MDA will help you integrate the mix you have
    today, and give you an architecture to support
    the unexpected
  • Focus on integrating legacy applications
  • Ensure smooth integration of COTS applications
  • Models are testable and simulatable

7
What is Model Driven Architecture?
  • A New Way to Specify and Build Systems
  • Based on modeling with UML
  • Supports full lifecycle
  • Builds in Interoperability and Portability
  • - Applies directly to the mix you face
  • Programming language
  • Network
  • Operating system
  • Middleware

8
What is OMG (Contd.)
9
Basic Idea of MDA
Transformation Rules
  • Meta Data!
  • Models are stored in a repository
  • Transformations!
  • Steps/rules are defined to transform the domain
    entities to the necessary pieces of the technical
    architecture
  • First pass is an Application Model
    (technology-specific)
  • Second pass is the Code Model (i.e., working app)

Domain Model
Domain Model
Technology Transformations
Application Model
Implementation Transformations
Code Model
Code Model
10
Primary Idea of MDA
PIM
PSM (1)eg. EJB
PSM (2)eg. .NET
System Code EJB
System Code .NET
11
Primary Idea of MDA Contd.
  • Platform Specific Models
  • PSMs are generated from PIMs
  • Model transformation
  • Upcoming UML Standard (QVT)
  • Mark Model in PIM
  • Currently only partial PSMs are generated
  • PSMs are source for code generators
  • These code generators can be complete

12
Primary Idea of MDA Contd.
  • Verification of system properties at PIM
  • Verification of system properties at PSM
  • In theory no component testing at code level
  • Only System Test
  • Documentation always up-to-date

13
Generating Implementations
Platform-Independent Model
Java/EJBModel
OtherModel
CORBA Model
XML/SOAPModel
14
Integrating Legacy COTS
Platform-Independent Model
COTS App
OtherModel
Legacy App
15
Automating Bridges
Platform-Independent Model
MDA Tools combine application and platform
knowledge to generate bridges
XML/SOAPModel
CORBA Model
XML/SOAP System
16
MDA Models
  • Usually represented in UML
  • All MOF based models possible
  • Detailed Models
  • Complete naming of elements
  • All details left out in the model are left out in
    the system
  • Constraints of model elements

17
Technologies
  • UML, CWM, MOF
  • Modeling Baseline
  • XMI
  • Representation for MOF/UML models
  • JMI, EMF
  • APIs for XMI
  • OCL
  • Enhances models with formal descriptions
  • QVT

18
Modeling Baseline
  • UML
  • MOF
  • CWM (Common Warehouse Metamodel)
  • Modeling constructs for Data Warehouses
  • Database Models
  • Query Facilities
  • Supported by major Portal Vendors
  • IBM, Oracle, Unisys

19
Meta-Object Facility (MOF)
  • 4 layer stack
  • Base for different modeling standards
  • UML, CWM
  • Principally open
  • M3 contains a principal set of modeling constructs

MOF Class
M3 MetametametadataMetaMeta-Model
instance of
M2 MetametadataMetamodel
UML Class
instance of
M1 MetadataModel
instance of
BMWW-1234
M0 Objects/Data
20
UML Extensions
  • UML cannot be complete
  • 2 ways to extend UML/MOF
  • heavyweight completely new meta-model
  • Lightweight
  • Stereotypes
  • Tagged Values
  • UML/MOF profiles

21
UML Profiles in MDA
UML Class
M2
inherits
entity
ltltentitygtgt Book
M1
22
UML Profiles in MDA
  • UML Profile for EDOC
  • Specialized Profiles
  • Problem
  • Only proof-of-concept
  • Incomplete
  • Lack of formality
  • MDA Tool Vendors have invented their own profiles
  • Lack of portability

23
UML Profiles in MDA
  • Stereotypes/Tagged Values
  • Interpreted by code generators
  • Example
  • Model generator for EJB
  • Stereotype entity
  • persistent objects Entity Beans
  • Stereotype PK
  • Marks attribute as Primary Key

24
UML Profiles in MDA
PSM
PIM
Book EJB
Database Tables
Deployment Descriptor
BookImpl(implementation class)
PK
BookHome(home interface)
BookRemote (remote interface)
25
OCL
  • Object Constraint Language
  • Used for exact modeling of UML/MOF models
  • Small language
  • Simple built-in types
  • Collection types
  • Elements of the model can be used

26
OCL
  • Describes Logical Constraints
  • Attached to modeling elements
  • Documentation Purposes
  • Used for formal verification
  • Used for generation of testcases
  • Can be checked at runtime
  • May throw exceptions
  • See Design by Contract

27
OCL
  • OCL for pre-/postcondition
  • Directly from specification
  • Example
  • Class Account models bank account
  • Field balance stores balance
  • Methods deposit/withdraw
  • context Accountdeposit(int amount)
  • pre amount gt 0
  • post balance balance_at_pre amount
  • context Accountwithdraw(int amount)
  • pre amount gt 0 and balance gt amount
  • post balance balance_at_pre - amount

28
OCL
  • OCL used for invariants
  • Holds during lifetime of an object
  • Constraints between model elements
  • Defined at the level of the meta-model
  • Must hold before and after transformation

29
OCL
  • OCL for Initialization code
  • OCL for Navigation expressions

context Copyinv self.copyOfBook.authorsOfBook-gts
ize() gt 0
Book
Author
Copy
authorsOfBook
copyOfBook
1

30
QVT
  • Querie, View, Transformation
  • RFC of OMG for MDA transformations
  • 15 submissions
  • Declarative transformation languages
  • Imperative transformation languages
  • Hybrid

31
MDA Tools
  • IDEs Modeling Tools
  • IBM Rational XDE (Java .NET)
  • Borland Together
  • Microsoft Whitehorse (appears 2005)
  • Poseidon
  • MDA based Code Generators
  • AndroMDA
  • PEERS
  • Architectural IDEs
  • Interactive Objects ArcStyler

32
IDEs Modeling Tools
  • Focus on Roundtrip Engineering
  • Growing support for dynamic stuff
  • Partial support for code generators
  • Invoked called from the tool
  • Support for Design Patterns
  • Strong reverse engineering support
  • String refactoring support

33
MDA based Code Generators
  • Models as Input
  • Generates Code from these Models
  • UML Profiles guide code generation
  • Examples
  • AndroMDA
  • Extensible with cartridges
  • PEERS
  • Generation of Persistent .NET DataModel from UML
    class diagrams

34
MDA Applicability
  • MDA good for
  • Persistent objects
  • Generation of Datamodels
  • Those scenarios where Models are expressive
    enough
  • Class diagrams are well understood
  • Generation of StateMachines
  • Generation of (Design) Patterns
  • Many Patterns already supported by IDEs
  • Generation of constraint checks

35
MDA Applicability
  • MDA not so good for
  • Dynamic stuff
  • Operations
  • UML Action Semantics
  • Describes semantics of operations
  • Requires a concrete language that conforms to UML
    Action Semantics

36
Next Steps
  • Automatic Generation of methods
  • Automatic Generation of database Queries
  • Integrated Model Checking
  • Deadlock detection
  • State machines
  • Theory based on Hoares Concurrent sequential
    processes (CSP)

37
Conclusion
  • Smooth integration across intra- and
    inter-business boundaries (across deployment
    technologies)
  • Reuse of applications, code, training and people
  • Technology-independent representation of the
    business
  • Scalability, robustness security via generated
    code
  • Stable model-based approach maximizes ROI
  • Rapid inclusion of the next best thing
Write a Comment
User Comments (0)
About PowerShow.com