Presentation is loading. Please wait.

Presentation is loading. Please wait.

MDA and QVT in Together Architect 2006  Pavel Kobiakov, Borland Software Corporation  06 December 2005.

Similar presentations


Presentation on theme: "MDA and QVT in Together Architect 2006  Pavel Kobiakov, Borland Software Corporation  06 December 2005."— Presentation transcript:

1 MDA and QVT in Together Architect 2006  Pavel Kobiakov, Borland Software Corporation  06 December 2005

2 22 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA and QVT in Together Architect 2006 MDA Overview MDA Implementation in Together 2006 Demo Questions

3 MDA Overview

4 42 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA Overview  MDA stands for “Model Driven Architecture”  Set of OMG standards:  Meta-Object Facility (MOF)  Unified Modeling Language (UML), UML Profiles  XML Metadata Interchange (XMI)  Query/View/Transformation RFP (QVT)  MOF Model to Text Transformation Language RFP  Models  Computation independent model (CIM)  Platform independent model (PIM)  Platform specific model (PSM)

5 52 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA applications  Transformations  Model to model (PIM->PSM, PSM->PSM)  Model to text (PSM->code)  Traceability  Sample application  PIM (UML) -> DB PSM (UML+Profile) -> SQL  PIM (UML) ->.NET PSM (Custom model) -> HTML/C# code  PIM (UML) -> J2EE PSM (Custom model) -> HTML/Java code  Not 100% automated, customizations might be required  Changing generated models/code, continuous application  Generating parts of the system PIM PSM Code PSM Code

6 62 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Query/View/Transformation (QVT) language  Language for defining transformations  Spec. has both declarative and imperative parts  Heavily based on OCL

7 MDA Implementation in Together

8 82 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA in Together 2006  Together 2006 is based on Eclipse platform  EMF (Eclipse Modeling Framework) instead of MOF  PIMs: Together UML projects, EMF models  PSMs: Together UML projects, EMF models  Together models available via EMF-compliant APIs Transformations:  Operational QVT for model to model transformations  Java (via EMF API) for model to model transformations  Java (with JET) for model to text transformations

9 92 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA in Together: Transformations  Model to model  QVT  Editor with highlighting, code sense, etc.  Concise syntax (OCL)  Eclipse QVT debugger  Automated traceability  Java  Standard Java editor  Verbose syntax  Standard Eclipse Java debugger  Manual traceability  Model to text  Java, Java Emitter Templates (JET)  Transformation framework integration  Apply transformations being developed  Deploy transformation as Eclipse plugins  Run deployed transformations directly or as Eclipse builders

10 102 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA Implementation: QVT features  QVT specification ad/05-03-02 (draft)  Imperative mappings and queries  Metamodel import  Transformation import  Traceability  Support for native (java) code

11 112 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | QVT (OCL) vs Java example: getBaseClasses() -- QVT query getBaseClasses(pack: ecore::EPackage): Bag(ecore::EClass) { pack.eClassifiers.oclAsType(ecore::EClass)->select(c | c.eSuperTypes->isEmpty()) } // Java public static EClass[] getBaseClasses(EPackage pack) { List baseClasses = new ArrayList(); for (Iterator it = pack.getEClassifiers().iterator(); it.hasNext(); ) { EClassifier classifier = (EClassifier) it.next(); if (classifier instanceof EClass == false) { continue; } EClass klass = (EClass) classifier; if (klass.getESuperTypes().isEmpty()) { baseClasses.add(klass); } return (EClass[]) baseClasses.toArray(new EClass[baseClasses.size()]); }

12 122 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA in Together: QVT editor

13 132 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | MDA in Together: Related Functionality  EMF APIs for Together Projects  UML 1.4  UML 2.0  Business processes (BPMN)  OCL 2.0  Model Search  Model QA (audits and metrics)  Documentation generation  Code generation  Invariants, pre/post conditions, operations bodies

14 Demo

15 152 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Sample transformation: Uml2Ecore Demo  New MDA Transformation Project  New QVT Transformation  Input/output metamodels  Transformation code  Mappings and queries  Method context  Traceability – resolve*()  Apply Transformation Wizard, QVT Launch Configuration  Examining transformation results  Trace View  Demo

16 162 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Debugging Uml2Ecore Transformation  Standard Eclipse debugger for QVT  Stepping (Step Over/Step Into, Step Return, Run to Line)  Line breakpoints  Variables view  Expressions view  Demo

17 172 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Deploying Uml2Ecore transformation  MDA Transformation Project is an Eclipse plugin Project  File/Export/Deployable plugins and fragments  Apply Compiled Transformation Wizard  QVT Transformation Builder  Demo

18 182 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Creating “external” models  Use existing XSDs to generate EMF metamodels  Generate EMF metamodel from XSD, deploy  Write transformation against the new metamodel  Demo: create AbiWord document  xsd from http://www.abisource.com/awml.xsd (needs minor changes)http://www.abisource.com/awml.xsd  Fix metamodel: AbiWordType persistence, Ns prefix, plugin.xml: awml->abw  Generate metamodel code, deploy  Write QVT  Create sample AbiWord document from a UML 2.0 model

19 192 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Transformation samples  Bundled samples  UML 2.0 to XHTML  UML 2.0 to XSD  SimpleUML to RDB  UML 2.0 to Ecore (via Together EMF API)  Ecore to UML 2.0  RDB to DDL  Other areas  Web Services, J2EE, etc.

20 202 June 2015| Copyright © 2005 Borland Software Corporation. All rights reserved. | Resources  OMG web site http://www.omg.org/mda/http://www.omg.org/mda/  EMF http://www.eclipse.org/emf/http://www.eclipse.org/emf/  OCL http://www.omg.org/cgi-bin/doc?ptc/03-10-14http://www.omg.org/cgi-bin/doc?ptc/03-10-14  QVT http://www.omg.org/cgi-bin/doc?ad/05-03-02http://www.omg.org/cgi-bin/doc?ad/05-03-02  Together Architect 2006 (trial version) http://www.borland.com/downloads/download_together.html http://www.borland.com/downloads/download_together.html  Books:  MDA Explained: The Model Driven Architecture--Practice and Promise by Anneke Kleppe, et al  Model Driven Architecture: Applying MDA to Enterprise Computing by David S. Frankel (Paperback)  MDA Distilled (Addison-Wesley Object Technology Series) by Stephen J. Mellor, et al (Paperback)  The Object Constraint Language: Getting Your Models Ready for MDA, Second Edition by Jos Warmer, Anneke Kleppe

21 Questions


Download ppt "MDA and QVT in Together Architect 2006  Pavel Kobiakov, Borland Software Corporation  06 December 2005."

Similar presentations


Ads by Google