0
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,042

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
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,042
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
91
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • stückweise durchgehen
  • Java schlecht im Abstrahieren von Struktur, Redundanz
    Code-Generierung definiert Platform-Mapping (Architekt)
    Referenz aus anderen DSLs, Wartbarkeit
  • Java schlecht im Abstrahieren von Struktur, Redundanz
    Code-Generierung definiert Platform-Mapping (Architekt)
    Referenz aus anderen DSLs, Wartbarkeit
  • Java schlecht im Abstrahieren von Struktur, Redundanz
    Code-Generierung definiert Platform-Mapping (Architekt)
    Referenz aus anderen DSLs, Wartbarkeit
  • Raise level of abstraction, Avoids redundancy
    Separation of concerns, Reuse of domain concepts
    Higher expressiveness, Ubiquitous language
  • Die DSL für DSLs, Eclipse-basiert
    Define textual DSLs easily, Ready-to-use tool-chain, Easy but flexible customizing and tweaking,
    Durable foundation with Java Eclipse EMF, Strong community
  • Transcript of "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
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×