Presentation is loading. Please wait.

Presentation is loading. Please wait.

MDA and QVT  Tom Gullion, Director of Product Management, Together Products.

Similar presentations


Presentation on theme: "MDA and QVT  Tom Gullion, Director of Product Management, Together Products."— Presentation transcript:

1 MDA and QVT  Tom Gullion, Director of Product Management, Together Products

2 Agenda  MDA Overview  QVT Overview  QVT By Example  QVT Demos  Developing QVT  Summary

3 MDA Overview

4  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?

5  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?

6 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.

7 Model Marking Transformation  Marks are specific to a transformation  Can be a stereotype in a profile, for example

8 Machine Code Impossible? The Abstraction Gap  Middleware makes MDA a potential reality Level of Abstraction Generators 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

9 QVT Overview

10 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

11 Example Transformation

12 UML to RDB Example  UML Class model  Relational Data Model Model Query View transformation

13 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

14 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)

15 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

16 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

17 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

18 QVT by Example  A few example QVTs

19 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.

20 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)

21 QVT Demos  A few examples

22 QVT example #1: PIM to PSM  PIM: Three classes and a few attributes…  QVT: AddScaffoldingCode  Simply add getter and setter methods

23 AddScaffoldingCode.qvt Required Impl

24 Control Flow in AddScaffoldingCode.qvt  main (not surprisingly) starts it off  mapping methods do most of the work

25 Applying QVT transformations – 1of 4  Select input model  Choose menu option

26 Applying QVT Transformations – 2 of 4  Select QVT to use  Select target model  Optionally create trace file

27 Applying QVT Transformations – 3 of 4  Transformation result – note added getter/setter methods

28 Applying QVT Transformations – 4 of 4  Trace file view

29 Developing QVT  Walking through the dev features

30 QVT Editor, Model Navigator, Metamodel Browser Code Completion MetaModel Browser Project Metamodels and PrimitiveTypes Syntax Highlighting Error Annotations

31 QVT Debugger  Create Debug or Run configuration  QVT Debugger  Debug Perspective  Synchronized Debug, Code and Outline views  Breakpoints  Variables, Watches

32 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

33 Testing a compiled transformation – 2 of 2  Select transformation  Select target model

34 UC2Class QVT  Use Case to Class QVT  See included project

35 PIM 2 PSM Using Library QVT  Extend Add Scaffolding QVT  Reusable QVT library example  See included project

36 Applying QVT to submodels  User-selectable scope

37 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

38 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

39 BpmnToUml.qvt

40 QVT Summary

41 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

42 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, 2ed Jos Warmer and Anneke Kleppe


Download ppt "MDA and QVT  Tom Gullion, Director of Product Management, Together Products."

Similar presentations


Ads by Google