• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
MDSD with Eclipse @ JUG Hamburg
 

MDSD with Eclipse @ JUG Hamburg

on

  • 8,355 views

 

Statistics

Views

Total Views
8,355
Views on SlideShare
8,268
Embed Views
87

Actions

Likes
9
Downloads
404
Comments
0

5 Embeds 87

http://www.jughh.org 73
http://www.slideshare.net 8
http://jughh.posterous.com 3
http://www.linkedin.com 2
http://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

MDSD with Eclipse @ JUG Hamburg MDSD with Eclipse @ JUG Hamburg Presentation Transcript

  • Model Driven Software Development with Eclipse Sven Efftinge Sebastian Zarnekow
  • MDA Model Driven Architecture
  • MDSD IS NOT MDA!
  • TOP5 DON’TS IN CODE GENERATION
  • UML for CODE GENERATION?
  • CODE GENERATION USED TO CONSTRAIN DEVELOPERS
  • SLOW GENERATION / BAD INTEGRATION
  • OVER-REUSE
  • OVER-ENGINEERING
  • • Domain Specific Language Development Framework • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • • Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • • Domain mming Language Development Framework Progra Specific • Based on:
  • • Domain mming Language Development Framework Progra Specific • Based on: • Eclipse
  • • Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF)
  • • Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • • History
  • • History • 2005 : Prototype @ openArchitectureWare
  • • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF
  • • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team
  • • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo
  • • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo • 09/2009 : Galileo SR1 with Xtext 0.7.2
  • in numbers
  • 9 active committers
  • ~1.000.000 lines of code
  • ~2.000 unit tests
  • ~400 newsgroup messages per month
  • ~200 Followers for @Xtext
  • -6.750 Hudson build points
  • 182 project years
  • 182 project years says Ohloh.net
  • Some users
  • Deutsche Börse Systems AG
  • Fraunhofer IWES
  • BMW Car IT
  • APG Affichage
  • @SuppressWarnings("serial") @Entity Entity @Table(name = "BUCHUNGSKREISE_F") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings("unused") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq") @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1) BKR_SEQ @Column(name = "BKR_ID", nullable = false BKR_ID false) private Long bkrId bkrId; public Long getBkrId() { return bkrId; } public void setBkrId(final Long bkrId) { this.bkrId = bkrId; } @Column(name = "KONTO_NR", nullable = false length = 45 KONTO_NR false, 45) private String kontoNr; kontoNr public String getKontoNr() { return kontoNr; } public void setKontoNr(final String kontoNr) { String oldValue = this.kontoNr; this.kontoNr = kontoNr; firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr); }
  • @SuppressWarnings("serial") @Entity Entity @Table(name = "BUCHUNGSKREISE_F") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings("unused") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq") @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1) BKR_SEQ @Column(name = "BKR_ID", nullable = false BKR_ID false) private Long bkrId bkrId; public Long getBkrId() { return bkrId; } public void setBkrId(final Long bkrId) { this.bkrId = bkrId; } @Column(name = "KONTO_NR", nullable = false length = 45 KONTO_NR false, 45) private String kontoNr; kontoNr public String getKontoNr() { return kontoNr; } public void setKontoNr(final String kontoNr) { String oldValue = this.kontoNr; this.kontoNr = kontoNr; firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr); }
  • External DSL with Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr (notNull, length=45) Long rgNrBkrIdentifikator (notNull, length=1) String referenzcodeKontoNr (notNull, length=45) }
  • External DSL with Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr Long rgNrBkrIdentifikator String referenzcodeKontoNr }
  • External DSL with Xtext BUCHUNGSKREISE_F entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr RG_NR_BKR_IDENTIFIKATOR Long rgNrBkrIdentifikator String referenzcodeKontoNr }
  • entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { }
  • entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { } TABLE BUCHUNGSKREISE_F ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Database Schema
  • entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { } TABLESimilar to BUCHUNGSKREISE_F Ruby On Rails ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Database Schema
  • Getting Started with Xtext
  • Working with
  • Codegeneration Editor
  • Codegeneration Editor AST
  • Editor AST TeX Xpa T ma p TeXeXpa p n nd m l p Te m a p n ad m pln lad te pl ad te at te e Generator Codegeneration
  • Editor AST TeX Xpa T ma p TeXeXpa p n nd m l p Te m a p n ad m pln lad te pl ad te at te e Generator Codegeneration E Ex xe Ex A c r Ex Ae etcu uta Aecrtcuifata bl A rti uifata ctbl e rt fata ctb e ifa c b le ct t le
  • Accessing models from Java
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl");
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true);
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0);
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName());
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName()); // change name of first element to "Bar" model.getElements().get(0).setName("Bar");
  • Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName()); // change name of first element to "Bar" model.getElements().get(0).setName("Bar"); // save resource resource.save(null);
  • Integration with EMF
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMIResource Resource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMIResource Resource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource Text
  • Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource Text Parser Linker Serializer ValueConverter ScopeProvider Formatter
  • Customizing licensed by http://www.wordle.net/
  • Customizing licensed by http://www.wordle.net/
  • Customizing licensed by http://www.wordle.net/
  • Customizing licensed by http://www.wordle.net/
  • Customizing licensed by http://www.wordle.net/
  • Customizing MyCustomLabelProvider licensed by http://www.wordle.net/
  • Dependency Injection with Google Guice
  • Dependency Injection with Google Guice
  • Dependency Injection with Google Guice No dependency to concrete implementation
  • Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction
  • Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction Easy testing
  • Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction Easy testing Easy composition
  • Advanced Editor Features
  • Navigation and Validation
  • Navigation and Validation
  • Find declaration in index
  • Default builder indexes whole class path
  • Incremental builder
  • Incremental builder
  • Incremental generation
  • Incremental generation
  • Textual & Graphical Combined
  • Navigation
  • Navigation
  • Inplace editing
  • Inplace editing
  • Referring to Types
  • Referring to Types • EMF Model for Java types and their members
  • Referring to Types • EMF Model for Java types and their members • @Runtime: java.lang.reflect
  • Referring to Types • EMF Model for Java types and their members • @Runtime: java.lang.reflect • @Eclipse: org.eclipse.jdt.core
  • Java classes
  • Java classes
  • Imports for Java types
  • Imports for Java types
  • Instant feedback
  • Content Assist
  • ... with respect to imports
  • Navigation to Java source code
  • Advanced matching of proposals
  • Questions? www.xtext.org Twitter: @Xtext