Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Software Installation
•   Unzip the Eclipse distribution matching your OS
    Windows users: Use a location close to the r...
Domain-specific Languages
With
Eclipse Modeling
Jan Köhnlein, Karsten Thoms
Markus Völter, Sebastian Zarnekow
itemis AG
Karsten Thoms    Sebastian Zarnekow



                                 Jan Köhnlein
       Markus Voelter
Karsten Thoms    Sebastian Zarnekow



                                 Jan Köhnlein
       Markus Voelter
Domain-specific Language
        (DSL)
Domain-specific Language
         (DSL)

 a formal, processable language
targeting at a specific viewpoint
     or aspect of...
Example: JPA
@Entity
public class Customer implements Serializable {
  private Long id;
  private String name;
  private Address addres...
@Entity
public class Customer implements Serializable {
  private Long id;
  private String name;
  private Address addres...
Abstraction
The right tool
           for
 the right job
MWE
Xpand
G
 ra
      m
       m
           ar
Reference




                    ar
 Model




                 m
                m
            ra
            G
Reference




                    ar
 Model




                 m
                m
            ra
            G
Reference




                           ar
 Model




                        m
                       m
                ...
Reference




                           ar
 Model




                        m
                       m
                ...
Reference




                            ar
 Model




                          m
                        m
            ...
Reference




                            ar
 Model




                          m
                        m
            ...
Editor




         Generator
Editor




   AST

         Generator
Editor




            AST                  TeX Xpa
                               T ma  p
                             Te...
Editor




            AST                  TeX Xpa
                               T ma  p
                             Te...
Editor




                      AST                        TeX Xpa
                                               T ma  p...
Showtime
Generation Gap
    Pattern
      BaseClass
     baseMethod()
                          framework
                         ...
Questions?

   find out more at
 http://www.xtext.org
Domain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse Modeling
Upcoming SlideShare
Loading in …5
×

Domain Specific Languages With Eclipse Modeling

2,636 views

Published on

Domain-specific Languages with Eclipse Modeling
with Sebastian Zarnekow, Karsten Thoms, Markus Völter
Tutorial at Eclipse Summit Europe 2009

Published in: Technology
  • Be the first to comment

Domain Specific Languages With Eclipse Modeling

  1. 1. Software Installation • Unzip the Eclipse distribution matching your OS Windows users: Use a location close to the root directory • Run the Eclipse executable • Choose File -> Import -> Existing projects into workspace • Select Archive file and choose workspace.zip from the USB stick
  2. 2. Domain-specific Languages With Eclipse Modeling Jan Köhnlein, Karsten Thoms Markus Völter, Sebastian Zarnekow itemis AG
  3. 3. Karsten Thoms Sebastian Zarnekow Jan Köhnlein Markus Voelter
  4. 4. Karsten Thoms Sebastian Zarnekow Jan Köhnlein Markus Voelter
  5. 5. Domain-specific Language (DSL)
  6. 6. Domain-specific Language (DSL) a formal, processable language targeting at a specific viewpoint or aspect of a system.
  7. 7. Example: JPA
  8. 8. @Entity public class Customer implements Serializable { private Long id; private String name; private Address address; private Collection<Order> orders = new HashSet<Order>(); private Set<PhoneNumber> phones = new HashSet<PhoneNumber>(); public Customer() {} @Id public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } @OneToMany public Collection<Order> getOrders() { return orders; } public void setOrders(Collection<Order> orders) { this.orders = orders; } @ManyToMany public Set<PhoneNumber> getPhones() { return phones; } public void setPhones(Set<PhoneNumber> phones) { this.phones = phones; } }
  9. 9. @Entity public class Customer implements Serializable { private Long id; private String name; private Address address; private Collection<Order> orders = new HashSet<Order>(); private Set<PhoneNumber> phones = new HashSet<PhoneNumber>(); public Customer() {} @Id public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } entity Customer { public void setName(String name) { this.name = name; String name } Address address public Address getAddress() { return address; Order* orders } public void setAddress(Address address) { PhoneNumber** phones this.address = address; } } @OneToMany public Collection<Order> getOrders() { return orders; } public void setOrders(Collection<Order> orders) { this.orders = orders; } @ManyToMany public Set<PhoneNumber> getPhones() { return phones; } public void setPhones(Set<PhoneNumber> phones) { this.phones = phones; } }
  10. 10. Abstraction
  11. 11. The right tool for the right job
  12. 12. MWE Xpand
  13. 13. G ra m m ar
  14. 14. Reference ar Model m m ra G
  15. 15. Reference ar Model m m ra G
  16. 16. Reference ar Model m m ra G DSL Workbench
  17. 17. Reference ar Model m m ra G DSL Workbench Editor
  18. 18. Reference ar Model m m ra G DSL Workbench Editor Infrastucture
  19. 19. Reference ar Model m m ra G DSL Workbench Editor Infrastucture Generator
  20. 20. Editor Generator
  21. 21. Editor AST Generator
  22. 22. 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
  23. 23. 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
  24. 24. 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 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
  25. 25. Showtime
  26. 26. Generation Gap Pattern BaseClass baseMethod() framework manually written AbstractGeneratedClass generatedMethod() generated ConcreteCustomizedClass overriddenMethod() generated once additionalMethod() modified manually
  27. 27. Questions? find out more at http://www.xtext.org

×