mda and qvt tom gullion, director of product management, together products
TRANSCRIPT
![Page 1: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/1.jpg)
MDA and QVTTom Gullion, Director of Product Management,
Together Products
![Page 2: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/2.jpg)
Agenda
MDA Overview QVT Overview QVT By Example QVT Demos Developing QVT
Summary
![Page 3: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/3.jpg)
MDA Overview
![Page 4: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/4.jpg)
According to the Object Management Group (OMG): MDA provides an open, vendor-neutral approach to the
challenge of business and technology change. MDA aims to separate business or application logic from
underlying platform technology. Platform-independent models can enable intellectual property to
move away from technology-specific code, helping to insulate business applications from technology evolution, and further enable interoperability.
What is MDA?
![Page 5: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/5.jpg)
MDA is not a single specification, but a collection of related OMG specifications: Unified Modeling Language (UML™) 2.0
Infrastructure Superstructure Object Constraint Language (OCL) Diagram Interchange Profiles
Meta-Object Facility (MOF) XML Meta-Data Interchange (XMI) Common Warehouse Meta-model (CWM) Query View Transformation (QVT)
What Comprises MDA?
![Page 6: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/6.jpg)
Transformations
This is the challenge for MDA! Inspired by existing CWM transformation technology
MOF2 Core will align basis of UML and CWM
Query / View / Transformation (QVT) is the answer
A record of transformation is required to maintain traceability and synchronization.
![Page 7: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/7.jpg)
Model Marking Transformation
Marks are specific to a transformation Can be a stereotype in a profile, for example
![Page 8: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/8.jpg)
Machine Code
Impossible?
The Abstraction Gap
Middleware makes MDA a potential reality
Level of Abstraction
Generators
1
0..*
security
mortgages
1
0..*
borrower
mortgages
10..*
ownerhouses
House
-value:Money
Person
-ssn:Integer-salary:Money
+getMortgage(sum:Money,security:House):Mortgage
Mortgage
-principal:Money-monthlyPayment:Money-start:Date-end:Date
Machine Code with Operating System
Impractical?3GL with Operating System
Unlikely?3GL with Middleware
Practical(ly)Middleware with Framework
Today!
A b
s t r
a c
t i o
n G
a p
![Page 9: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/9.jpg)
QVT Overview
![Page 10: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/10.jpg)
Query-View-Transformation
QVT specification is the heart of Model Driven Architecture
Queries take a model as input and select specific elements from that model
Views are models that are derived from other models Transformations take a model as input and update it or
create a new model
![Page 11: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/11.jpg)
Example Transformation
![Page 12: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/12.jpg)
UML to RDB Example
UML Class model Relational Data Model
Model Query Viewtransformation
![Page 13: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/13.jpg)
Key Benefits of QVT
Core benefit of MDA Smaller, manageable models operating in concert versus huge,
monolithic models Models become “usable” development artifact
avoid intermediate work products
Enables intelligent code generation Insulate models and applications from deployment platform
technology reuse made into reality
![Page 14: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/14.jpg)
QVT in context
QVT might be used to: Transform
business process model object model (PIM to PIM) Analysis object model into Business Object model (PIM to PIM) Object model to data model (PIM to PIM or PIM to PSM) Object model to detailed object model (PIM to PSM)
![Page 15: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/15.jpg)
Applicable Benefits
Intermediate work products vanish due to clear value of all models
Repeatable, high-quality approach to software design/development
Automated traceability between models, queries, transformations and views
![Page 16: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/16.jpg)
Transformations
QVT provides language to implement model-to-model transformations
QVT fully supports OCL 2.0 expressions
Query libraries• Reusable libraries of QVT mappings
• Traceability• Automated traceability when executing mapping
• Extensible• QVT can call custom Java methods
![Page 17: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/17.jpg)
QVT Language Overview
Together® Architect 2006 implementation based on the revised submission for MOF 2.0 Query/View/Transformation RFP (OMG document ad/05-03-02)
Supports operational transformations
Two types of transformation methods: Mappings and Queries
![Page 18: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/18.jpg)
QVT by ExampleA few example QVTs
![Page 19: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/19.jpg)
Transforming a Use Case Model to a Class Model
This transformation automates the construction of a set of use case realization classes
It is rather simple: a 1-to-1 mapping from Actor to Class. Use Cases owned by the Actor are created as Operations within the Class.
![Page 20: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/20.jpg)
Transforming a PIM to a PSM
As a basic step toward elaborating the PSM, this QVT simply adds scaffolding code (e.g., getters and setters)
![Page 21: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/21.jpg)
QVT DemosA few examples
![Page 22: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/22.jpg)
QVT example #1: PIM to PSM
PIM: Three classes and a few attributes…
QVT: AddScaffoldingCode Simply add getter and setter methods
![Page 23: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/23.jpg)
AddScaffoldingCode.qvt
Required
Impl
![Page 24: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/24.jpg)
Control Flow in AddScaffoldingCode.qvt
main (not surprisingly) starts it off mapping methods do most of the work
![Page 25: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/25.jpg)
Applying QVT transformations – 1of 4
Select input model
Choose menu option
![Page 26: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/26.jpg)
Applying QVT Transformations – 2 of 4
Select QVT to use
Select target model Optionally create trace file
![Page 27: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/27.jpg)
Applying QVT Transformations – 3 of 4
Transformation result – note added getter/setter methods
![Page 28: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/28.jpg)
Applying QVT Transformations – 4 of 4
Trace file view
![Page 29: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/29.jpg)
Developing QVTWalking through the dev features
![Page 30: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/30.jpg)
QVT Editor, Model Navigator, Metamodel Browser
Code Completion
MetaModelBrowser
Project Metamodels and PrimitiveTypes
Syntax Highlighting
Error Annotations
![Page 31: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/31.jpg)
QVT Debugger
Create Debug or Run configuration
QVT Debugger Debug Perspective Synchronized
Debug, Code andOutline views
Breakpoints Variables, Watches
![Page 32: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/32.jpg)
Testing a compiled transformation – 1 of 2
Run project – Run As…., Eclipse Application Starts a runtime workspace with the compiled
transformation included Create a new source and target project for testing Do Model Apply Transformation QVT Compiled
![Page 33: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/33.jpg)
Testing a compiled transformation – 2 of 2
Select transformation
Select target model
![Page 34: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/34.jpg)
UC2Class QVT
Use Case to Class QVT See included project
![Page 35: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/35.jpg)
PIM 2 PSM Using Library QVT
Extend Add Scaffolding QVT Reusable QVT library example
See included project
![Page 36: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/36.jpg)
Applying QVT to submodelsUser-selectable scope
![Page 37: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/37.jpg)
Avoiding unnecessary parsing…
The QVT draft spec only defines complete models as input but this demands unnecessary parsing in many cases
generating XSD for a single class diagram transformations of a use case model transformations of a partition (package tree) of a model
fortunately, the Together group solved this problem and we’re getting this added to the QVT specification
![Page 38: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/38.jpg)
BPMN to UML example
Note we selected the Process Pool element
then we can Model Apply Transformation QVT … choose a Together UML20 project as the target
![Page 39: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/39.jpg)
BpmnToUml.qvt
![Page 40: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/40.jpg)
QVT Summary
![Page 41: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/41.jpg)
QVT in Together 2006 Summary
provides language to implement model-to-model transformations implementation based on the revised submission for MOF 2.0
Query/View/Transformation RFP (OMG document ad/05-03-02) fully supports OCL 2.0 expressions query libraries
Reusable libraries of QVT mappings
Traceability Automated traceability when executing mapping
Extensible QVT can call custom Java methods
![Page 42: MDA and QVT Tom Gullion, Director of Product Management, Together Products](https://reader030.vdocuments.net/reader030/viewer/2022032604/56649e5f5503460f94b595d7/html5/thumbnails/42.jpg)
References
QVT Language Reference, Together Architect 2006 online help
revised submission for MOF 2.0 Query/View/Transformation RFP (OMG document ad/05-03-02)
The Object Constraint Language, 2edJos Warmer and Anneke Kleppe