+ All Categories
Home > Documents > Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach...

Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach...

Date post: 09-Mar-2018
Category:
Upload: dinhnhan
View: 213 times
Download: 1 times
Share this document with a friend
67
Migration einer großen Modellierungsumgebung von UML/XML nach GMF/ Xtext
Transcript
Page 1: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Migration einer großen Modellierungsumgebung von UML/XML nach GMF/

Xtext

Page 2: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Moritz Eysholdt

• Software Architekt und Consultant bei itemis

• Committer in den Eclipse Projekten Xtext, Xpand und EMF Compare

• Sprecher auf diversen internationalen Konferenzen

Page 3: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

• Spezialisiert auf Model Driven Software Development• Gegründet in 2003• 140 Angestellte• Niederlassungen in Deutschland, Schweiz, Frankreich und

Kanada• Strategic Member der Eclipse Foundation

• http://twitter.com/itemis

Page 4: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Johannes Rupprecht

• Chefarchitekt der VSA Gruppe

• 2005-2008 IT Projektleiter des größten VSA Software Projekts

• 2002-2005 Architekt und einer der Entwickler des VSA Frameworks marvin

Page 5: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Group

• VSA: Verrechnungsstelle der Süddeutschen Apotheken • Gegründet 1983• 7000 deutsche Apotheker als Eigentümer• 1.100 Angestellte• Drei Geschäftsbereiche

• VSA Abrechnung: Abrechnung für Apotheken• azh: Abrechnung und IT für deutsche sonstige

Leistungserbringer• awinta: Apotheken Verwaltungs Systeme

Page 6: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Software Entwicklung bei VSA

• 150 Entwickler in verschiedenen Projekten in verschiedenen Standorten

• Interne Systeme, wie die beiden Abrechnungssysteme• Online Systeme für die Abrechnungskunden• Apotheken Verwaltungs Systeme für den Endanwender

• Entwicklung meistens in Java, aber auch in C#, C++, C, Objective-C

Page 7: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Softwareentwicklung vor der Einführung Eclipse-basierter

Modellierung

Page 8: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Die VSA verwendet ein Framework namens marvin.

Warum?

Page 9: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Die Entwicklung des Frameworks startete

2000

Page 10: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

marvin!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"#$%&'()'(!*++,-./0-12!

3145,'!612.'+0!

71(891:!"2;-2'!

71(891:!&0'+<!

*.0-)-0-'<!

")'20<'()-.'!

='+1(0<'()-.'!>?'0:1(8!@(-20-2;AB!

C<'(!*4D-2-<0(/0-12!

&'.5(-0E!

#/)/%6,-'20!%!*4/+0'(!

#/)/%6,-'20!

$5<-2'<<!FGH'.0<!I!$5<-2'<<!&'()-.'<!

@'(<-<0'2.'!

JK3L%6,-'20!#&@!!!!!!!!7'G%!!!!!!!!!!!!!!!<'()'(!

JK3L%6,-'20%*4/+0'(!

=',/0-12/,!M$!

612N;5(/0-12<<'()-.'!71(891:%OD+,P!

&'<<-12!&'()-.'!

='<<15(.'<'()-.'!

L-.'2<-2;!&'()-.'!

L1.8-2;!&'()-.'!

L-.'2.'!&'()-.'!

!"#$%%!&'()'(!

Kein JPA, kein Hibernate

Nur EJB 1.3, kein Spring

Kaum Web-Frameworks, nur Struts

Noch kein Eclipse Modeling, kein MDA

Page 11: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Neuimplementierung aller Systems

• Die VSA plante 2000 und 2002 mit der Neuimplementierung aller wichtigen Systeme der VSA Gruppe basierend auf Java zu beginnen.

• Daher großer Bedarf für unterstützende Frameworks.• Codegenerierung schien der richtige Weg• Basiert auf XML-Dateien• Später um UML-Modellierung ergänzt• MagicDraw als UML-Werkzeug, eigene Plugins zur XML-

Generierung

Page 12: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Systeme basiert auf marvin

Page 13: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

!"#$%&'(%#)**)+,%-+.%

/01200%3*45565%

/00%#4,%76485%

9&:%$685)5;6,;%6,;);)65%

<:9%$685)5;6,;%=)6>5%

/?@%>+8AB+>5%

&&20%#45A5%

/000%CD-%E)4F84#5%

Page 14: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

!"#$%&'&()**)$!&+$,&

'-.-//&0*12232&

45/&63#2)273!7&3!7)7)32&

85&63#2)273!7&9)3:2& ';<&

:$#=>$:2&

5';&(12=2&

'///&?@+&%)1A#1(2&

Page 15: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Das Projekt neue marvin Modellierung

Page 16: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Warum neu?

Page 17: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Probleme mit der UML-Modellierung

• Ein UML-Modul öffnen dauerte bis zu einer Stunde

• Ein großes UML-Diagramm zu öffnen dauerte bis zu 10 min

• Schlechte Turnaround-Zeiten: (UML Diagram bearbeiten, XML generieren, Java generieren und via ANT kompilieren)

• Zu viel Zeit für Kaffee...

Page 18: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Probleme mit der UML-Modellierung

• Modellierung war nicht intuitiv, da UML teilweise zweckentfremdet wurde, um etwas auszudrücken, was in UML eigentlich nicht darstellbar ist

• Modellierung war umständlich, da semantische Werkzeugunterstützung fehlte (z.B. Content Assist)

• Das Modell war teilweise komplexer als die XML-Dateien

• Workflow-Diagramme wurden zu groß, wurden unübersichtlich.

Page 19: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Probleme mit der UML-Modellierung

• Modellelemente wurden String-basiert mit dem Namen referenziert, nicht via echter Referenz.

• Keine Validierung und Codevervollständigung im Editor• Branchen war nicht möglich, es konnte nur auf einem

Branch gearbeitet werden.• Es konnte nicht der gesamte Sprachumfang der XML-

Sprachen in UML abgedeckt werden.• Aus XML-Modellen können keine UML-Modelle erstellt

werden.• Keine Navigation zwischen Modellen und Code.

Page 20: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Projektinitialisierung

• Ziel: Usability und Performance der Modellierungsumgebung massiv zu verbessern.

• Vier Bewerber auf die Ausschreibung, drei gleiche Vorschläge: Xtext und GMF mit Eclipse

• Der Kompetenzvorteil bei Xtext verhalf itemis zum Sieg

Page 21: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Projektbeginn

• Festpreisvertrag: Entwickler der VSA sind an der Entwicklung beteiligt um Wissen bzgl. der neuen Technologien aufzubauen.

• Spezifikation: Dokument und Legacy Code

• Zwei Entwickler von itemis sowie zwei Vollzeit- und zwei Teilzeit-Entwickler der VSA.

Page 22: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Warum Eclipse Modeling?

• Großes Ökosystem an Modellierungswerkzeugen und -Frameworks wie in keiner anderen Platform:• EMF• Xtext• GMF

• Kombinierbarkeit textueller und grafischer Modellierung

Page 23: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Designentscheidungen

• Textuelle Modellierung für alle Sprachen mit Xtext• Grafische Modellierung für ausgewählte Aspekte bestimmter

Sprachen mit GMF um einen besseren Überblick zu erlauben (kein UML!)

• Integration des bestehenden marvin Generators als Eclipse Builder

• Werkzeug für eine 100% automatische Migration existierender Projekte, inklusive Diagram-Layout von MagicDraw. Möglichkeit, Projekte einzeln zu Migrieren.

• Migrierte und noch nicht migrierte Projekte müssen kombinierbar sein, da nicht alle Projekte auf einmal migriert werden können.

Page 24: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Zwei Sprachfamilien,fünf Sprachen

Page 25: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

<?xml version="1.0" encoding="ISO-8859-15"?><dataDictionary xmlns="http://www.vsa.de/datadict/1.45.2.4"> <domain> <databaseMapping tableName="VDOMAIN"> <column name="ID"> <IdType/> </column> </databaseMapping> <generator> <classes>...

<?xml version="1.0" encoding="ISO-8859-15"?><dataDictionary xmlns="http://www.vsa.de/datadict/1.45.2.4"> <view> <databaseMapping viewName="V_VATTRIBUTE_JOIN_VIEW"/> <generator> <classes>...da

tadi

ct.x

sdw

orkfl

owde

f.xsd <?xml version="1.0" encoding="ISO-8859-15"?>

<workflow xmlns="http://www.vsa.de/workflow/1.0"> <javadoc>comment</javadoc> <synchWorkflow isMasterWorkflow="true" isStartableAsDetailWorkflow="true"> <targetGuis> <gui name="JAVA"/> </targetGuis> <objectModel> <rootObject class="vsa.marvin.mod.schulung.workflow.impl.CustomerManagementRoot" name="CustomerManagement"> <javadoc>Rootobject of the workflow</javadoc> <value attributePath="searchFor" name="searchFor"/> </rootObject> </objectModel> <globalMasks> <globalActivities> <activity name="SearchCustomer2"> <javadoc></javadoc> <synchTransition nextStep="CURRENT_STEP"/> </activity>

XML + UML

Page 26: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

<?xml version="1.0" encoding="ISO-8859-15"?><dataDictionary xmlns="http://www.vsa.de/datadict/1.45.2.4"> <domain> <databaseMapping tableName="VDOMAIN"> <column name="ID"> <IdType/> </column> <column allowNulls="false" name="VDOMAINATTR"> <DecimalType precision="10" scale="0"/> </column> </databaseMapping> <generator> <classes> <superClass name="vsa.marvin.persist.DefaultPersistentObject"/> <domainIF internalName="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImplIF" name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.VDomainIF" baseOnly="true" generateBase="true" generatePublic="true"/> <domainImpl name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImpl" baseOnly="true" generateBase="true"/> </classes> <attributes> <defineAttributes> <attribute name="vdomainattr" type="int"> <javadoc></javadoc> <columnRef columnName="VDOMAINATTR"/> </attribute> </defineAttributes> </attributes> <createMethods/> <findMethods/> </generator> </domain></dataDictionary>

Page 27: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

?xml version="1.0" encoding="ISO-8859-15"? dataDictionary xmlns="http: www.vsa.de datadict 1.45.2.4" domain databaseMapping tableName="VDOMAIN" column name="ID" IdType column column allowNulls="false" name="VDOMAINATTR" DecimalType precision="10" scale="0" column databaseMapping generator classes superClass name="vsa.marvin.persist.DefaultPersistentObject" domainIF internalName="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImplIF" name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.VDomainIF" baseOnly="true" generateBase="true" generatePublic="true" domainImpl name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImpl" baseOnly="true" generateBase="true" classes attributes defineAttributes attribute name="vdomainattr" type="int" javadoc javadoc columnRef columnName="VDOMAINATTR" attribute defineAttributes attributes createMethods findMethods generator domain dataDictionary

XML-noise entfernen: </...>

Page 28: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

dataDictionary domain databaseMapping tableName="VDOMAIN" column name="ID" IdType column column allowNulls="false" name="VDOMAINATTR" DecimalType precision="10" scale="0" column databaseMapping generator classes superClass name="vsa.marvin.persist.DefaultPersistentObject" domainIF internalName="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImplIF" name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.VDomainIF" baseOnly="true" generateBase="true" generatePublic="true" domainImpl name="gen.vsa.marvin.mod.persist.examples.reference.views.joins.core.VDomainImpl" baseOnly="true" generateBase="true" classes attributes defineAttributes attribute name="vdomainattr" type="int" javadoc javadoc columnRef columnName="VDOMAINATTR" attribute defineAttributes attributes createMethods findMethods generator domain dataDictionary

Metadaten entfernen

Page 29: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

dataDictionary domain databaseMapping tableName="VDOMAIN" column name="VDOMAINATTR" DecimalType precision="10" scale="0" column databaseMapping generator classes superClass name="vsa.marvin.persist.DefaultPersistentObject" classes attributes defineAttributes attribute name="vdomainattr" type="int" javadoc javadoc columnRef columnName="VDOMAINATTR" attribute defineAttributes attributes createMethods findMethods generator domain dataDictionary

Default- und abgeleitete Werte entfernen

Page 30: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

dataDictionary domain databaseMapping tableName="VDOMAIN" databaseMapping generator classes superClass name="vsa.marvin.persist.DefaultPersistentObject" classes attributes defineAttributes attribute name="vdomainattr" type="int" javadoc javadoc attribute defineAttributes attributes createMethods findMethods generator domain dataDictionary

Spalten und Attribute zusammenfassen

Page 31: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

domain databaseMapping "VDOMAIN" superClass name="vsa.marvin.persist.DefaultPersistentObject" attribute "vdomainattr" type="int"

Mehr Noise entfernen

Page 32: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

domain-language-v2.0 package vsa.marvin.mod.persist.examples.reference.views.joins;

import vsa.marvin.persist.DefaultPersistentObject;

domain VDomain { database { table VDOMAIN; }

classes { superClass javaClass DefaultPersistentObject; }

attributes { private int vdomainattr; }

methods { }

}

Angenehme Syntax entwerfen

Page 33: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Werkzeugunterstützung für diese Sprache - gebaut in

einer Minute

Page 34: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video XtextDemo-Host-before.mp4)

Page 35: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt
Page 36: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video XtextDemo-Host-after.mp4)

Page 37: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video XtextDemo-Runtime.mp4)

Page 38: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

data

dict

.xsd

wor

kflow

def.x

sdDomain.xtext View.xtext

Workflow.xtext ObjectModel.xtext Mask.xtext

Page 39: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Modelle sind Quellcode!

• Dies ist gut, da die Handhabung von Quellcode etabliert ist: • Vergleichen, Mergen• Versionskontrolle• Anwendungsübergreifendes Copy’n’paste• Artifakte via E-Mail oder Web senden

• Des weiteren integriert es sich nahtlos mit..• Existierendem Quellcode• Existierender Buildinfrastruktur

Page 40: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Architektur

<XML/>Model

XtextModel

Xtend M2M

Xtend M2MLaden/Speichern:EMF’s XMLResource

Laden/Speichern:XtextResource

(extends EMF’s ResourceImpl)

Strukturdefinition:Ecore abgeleitet aus

XML Schema

Strukturdefinition:Ecore abgeleitet ausXtext Grammatiken

EMFModel

Page 41: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

XML Modelle migrieren

<XML/>Model

XtextModel

Xtend M2M

Xtend M2M

XMLResource.load() XtextResource.save()

Page 42: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Legacy Codegenerator integrieren

<XML/>Model

XtextModel

Xtend M2M

Xtend M2MXMLResource.

save()

XtextResource.load()

CodeGen

{ Java }

Page 43: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Generischer Integrationstest(Roundtrip)

<XML/>Model

XtextModel

Xtend M2M

Xtend M2M

XMLResource.save() XtextResource.load()

XMLResource.load() XtextResource.save()

Compare

XML2XtextDies Testet:

Serialization

ValueConversion

Scoping

Lexing/Parsing

Xtext2XML

Grammar

Page 44: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

GMF-Integration(Wie Diagramme gespeichert werden)

<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:wf="http://www.vsa.de/marvin/dsl/workflow/0.1"> <notation:Diagram xmi:id="_WRi84HSqEd-YCPMLqI1FhQ" type="workflow" measurementUnit="Pixel"> <children xmi:type="notation:Node" xmi:id="_WT_z8HSqEd-YCPMLqI1FhQ" type="2004"> <children xmi:type="notation:DecorationNode" xmi:id="_WUBCEHSqEd-YCPMLqI1FhQ" type="5005"/> <styles xmi:type="notation:DescriptionStyle" xmi:id="_WT_z8XSqEd-YCPMLqI1FhQ"/> <styles xmi:type="notation:FontStyle" xmi:id="_WT_z8nSqEd-YCPMLqI1FhQ" fontName="Lucida Grande" fontHeight="10"/> <styles xmi:type="notation:LineStyle" xmi:id="_WT_z83SqEd-YCPMLqI1FhQ"/> <element xmi:type="wf:NonGuiStep" href="CustomerManagement.wf#vsa_/steps:DeleteCustomer"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WT_z9HSqEd-YCPMLqI1FhQ" x="702" y="153"/> </children>...

<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:wf="http://www.vsa.de/marvin/dsl/workflow/0.1"> <notation:Diagram xmi:id="_WRi84HSqEd-YCPMLqI1FhQ" type="workflow" measurementUnit="Pixel"> <children xmi:type="notation:Node" xmi:id="_WT_z8HSqEd-YCPMLqI1FhQ" type="2004"> <children xmi:type="notation:DecorationNode" xmi:id="_WUBCEHSqEd-YCPMLqI1FhQ" type="5005"/> <styles xmi:type="notation:DescriptionStyle" xmi:id="_WT_z8XSqEd-YCPMLqI1FhQ"/> <styles xmi:type="notation:FontStyle" xmi:id="_WT_z8nSqEd-YCPMLqI1FhQ" fontName="Lucida Grande" fontHeight="10"/> <styles xmi:type="notation:LineStyle" xmi:id="_WT_z83SqEd-YCPMLqI1FhQ"/> <element xmi:type="wf:NonGuiStep" href="CustomerManagement.wf#vsa_/steps:DeleteCustomer"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WT_z9HSqEd-YCPMLqI1FhQ" x="702" y="153"/> </children>...

XMIvia EMF’s XMIResource

XMIvia EMF’s XMIResource

Semantic Model (das eigentliche Modell) Notation Model (Layout, Formatierung, etc.)

old approach

Page 45: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:wf="http://www.vsa.de/marvin/dsl/workflow/0.1"> <notation:Diagram xmi:id="_WRi84HSqEd-YCPMLqI1FhQ" type="workflow" measurementUnit="Pixel"> <children xmi:type="notation:Node" xmi:id="_WT_z8HSqEd-YCPMLqI1FhQ" type="2004"> <children xmi:type="notation:DecorationNode" xmi:id="_WUBCEHSqEd-YCPMLqI1FhQ" type="5005"/> <styles xmi:type="notation:DescriptionStyle" xmi:id="_WT_z8XSqEd-YCPMLqI1FhQ"/> <styles xmi:type="notation:FontStyle" xmi:id="_WT_z8nSqEd-YCPMLqI1FhQ" fontName="Lucida Grande" fontHeight="10"/> <styles xmi:type="notation:LineStyle" xmi:id="_WT_z83SqEd-YCPMLqI1FhQ"/> <element xmi:type="wf:NonGuiStep" href="CustomerManagement.wf#vsa_/steps:DeleteCustomer"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WT_z9HSqEd-YCPMLqI1FhQ" x="702" y="153"/> </children>...

workflow-language-v2.0 package vsa.marvin.mod.schulung.^workflow;

/* This workflow creates/removes/updates customer records */workflow CustomerManagement isMasterWorkflow canBeDetailWorkflow { firstStep OverviewStep;

references { objectModelRef CustomerManagement; externalDefinitionsRef Externals as infoheader; compWorkflowRef customersales workflow CustomerSales; }

workflowPart foopart { globalActivities { activity ShowCustomerCount -> ShowCustomerCountMessage; }

guiStep ShowSalesInclude { javaMask vsa.marvin.mod.schulung.^workflow.ShowSalesIncludeMask; activity NextMonth -> ShowSalesInclude;

Textvia XtextResource

XMIvia EMF’s XMIResource

Semantic Model (das eigentliche Modell)

GMF-Integration(Wie Diagramme gespeichert werden)

Notation Model (Layout, Formatierung, etc.)

Page 46: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

GMF-Integration: Konsequenzen

• Der grafische Editor muss nicht das gesamte Modell bearbeiten können• Günstiger• Grafische Syntax muss nur an den Stellen verwendet werden,

wo es der textuellen tatsächlich überlegen ist.

• Wenn die XMI-Datei verloren geht, geht nur Formatierung und Layout verloren, nicht aber das eigentliche Modell.

Page 47: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Showtime!

Page 48: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Inkrementeller Build

Page 49: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-Incremental-Build.mp4)

Page 50: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Codevervollständigung,Cross-Referenzen,

Navigation

Page 51: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-Contentassist-Navigation.mp4)

Page 52: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Validierung,Formatierung,

Outline,

Page 53: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-Validation.mp4)

Page 54: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-Formatting.mp4)

Page 55: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-Outline.mp4)

Page 56: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Find ReferencesOpen Model Elements Dialog

Page 57: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-FindRef-OpenModel.mp4)

Page 58: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Domain Diagramm:Eine Perspektive auf Entitäten

Page 59: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-DomainDiagram.mp4)

Page 60: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Workflow Diagramm:Eingebettete Diagramme

Page 61: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

(siehe video MarvinDemo-WorkflowDiagram.mp4 )

Page 62: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Was haben wir gelernt?

Page 63: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Migration• Eine zu 100% automatisierte Migration war notwendig• Ca. 75 CVS Module waren zu migrieren• Früh im Projekt ein automatisches Migrationswerkzeug

implementiert:• Alle CVS-Module auschecken und bauen• Modelle migrieren• Ergebnis durch Vergleiche von Artifakten validieren• Loggen aller Fehler und relevanter Unterschiede

• Alle Probleme in der Migration wurden vor dem Rollout gefunden!

• Aber: Suche nach Fehlern war deutlich zeitintensiver als erwartet

Page 64: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Training der Anwender

• Auch für sehr erfahrene Anwender ist es sehr hilfreich, in die völlig neue Art zu Modellieren und die neuen Werkzeuge eingewiesen zu werden.

• Ein Schulungsprojekt mit Tutorials wurde erstellt, um die wichtigsten Features zu vermitteln

• Alle Entwickler der VSA (sogar die Rumänischen) nahmen an einem 4-6-Stunden-Training teil

• Ergebnis: Sehr wenig Probleme in der Handhabung, wenig Supportaufwand für die VSA-Werkzeugentwickler

Page 65: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Verteiltes Projekt

• Verteilt über vier Orte• Gemeinsame Infrastruktur von Anfang an

• Subversion• Bug tracking system (Trac)• Wiki

• Wöchentliche Telefonkonferenzen für Statusupdates, Planung und um Probleme zu diskutieren

• Später: Kommunikationsregeln um das Arbeiten effizient zu halten

Page 66: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Moritz Eysholdt, itemis - Johannes Rupprecht, VSA

Komplexität minimieren

• Stabile Versionen der Frameworks verwenden

• GMF nur wo notwendig verwenden

• Existierende Modelle nur wenn notwendig migrieren, da man in der Gestaltung der Sprache nicht frei ist und die Migration ausführlich getestet werden muss.

• Arbeite testgetrieben und mit Continuous Integration (Aufwändig mit Eclipse Plugins)

Page 67: Migration einer großen Modellierungsumgebung von UML/XML ... · PDF filevon UML/XML nach GMF/ Xtext. Moritz Eysholdt, itemis - Johannes Rupprecht, VSA Moritz Eysholdt

Fragen?Diskussion


Recommended