Peter Friese, itemis
                            @peterfriese
                              @xtext
(c) 2009 Peter Friese. ...
➊
                             Peter Friese, itemis
                                @peterfriese
                         ...
➊   ➋                        Peter Friese, itemis
                                @peterfriese
                           ...
➊   ➋                                       ➌
                             Peter Friese, itemis
                          ...
➊   ➋                                       ➌
                             Peter Friese, itemis
                          ...
?
Right tool for the job?
Your trusty swiss army knife!
You’d want to core a few more apples...
... for an apple cake.
Still the best tool for the job?
Better use this one.
and this one:
A DSL is...
A specific tool
for a specific job
A specific tool
for a specific job
Think about your job!
Feel like this?
...
because
you
need
to
write
THIS?
THIS?
Wrong Level of Abstraction!
http://www.flickr.com/photos/rykerstribe/3222969466/
@SuppressWarnings("serial")
@Entity
@Table(name = "CUSTOMER_INFO")
public class CustomerInfo implements Serializable {

	 ...
@SuppressWarnings("serial")
@Entity
@Table(name = "CUSTOMER_INFO")
public class CustomerInfo implements Serializable {

	 ...
entity CustomerInfo
	 (id=CUST_ID, sequenceName=CUST_SEQ)
{
	
	 String emailAddress (notNull, length = 128)
	
}
entity CustomerInfo
	 (id=CUST_ID, sequenceName=CUST_SEQ)
{
	
	 String emailAddress (notNull, length = 128)
	
}




      ...
Demo
Creating an Entity DSL in 3 Simple Steps
➊
Create a DSL
Define the Grammar
Compile the Grammar
Start the Runtime Workbench
Start Using the DSL
➋
➋
Pimp My Write
➋
Create a Label Provider
➌
Add a Generator
Adding a Builder
∑
Concentrate on
  Essentials
Higher Efficiency
Better Maintainability




http://www.flickr.com/photos/flyforfun/2638180406/
No More Boring Code
Twitter: @xtext
http://www.xtext.org
Committers




 Heiko     Sven       Moritz    Peter    Dennis     Jan        Patrick Sebastian   Michael     Knut
Behrens...
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Upcoming SlideShare
Loading in …5
×

Xtext Eclipse Demo Camp Berlin

2,150 views

Published on

Slides for my talk on Domain Specific Languages at the Eclipse DemoCamp in Berlin.

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,150
On SlideShare
0
From Embeds
0
Number of Embeds
22
Actions
Shares
0
Downloads
46
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Xtext Eclipse Demo Camp Berlin

  1. 1. Peter Friese, itemis @peterfriese @xtext (c) 2009 Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php More info: http://www.peterfriese.de / http://www.itemis.com
  2. 2. ➊ Peter Friese, itemis @peterfriese @xtext (c) 2009 Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php More info: http://www.peterfriese.de / http://www.itemis.com
  3. 3. ➊ ➋ Peter Friese, itemis @peterfriese @xtext (c) 2009 Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php More info: http://www.peterfriese.de / http://www.itemis.com
  4. 4. ➊ ➋ ➌ Peter Friese, itemis @peterfriese @xtext (c) 2009 Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php More info: http://www.peterfriese.de / http://www.itemis.com
  5. 5. ➊ ➋ ➌ Peter Friese, itemis @peterfriese @xtext (c) 2009 Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php More info: http://www.peterfriese.de / http://www.itemis.com
  6. 6. ? Right tool for the job?
  7. 7. Your trusty swiss army knife!
  8. 8. You’d want to core a few more apples...
  9. 9. ... for an apple cake.
  10. 10. Still the best tool for the job?
  11. 11. Better use this one.
  12. 12. and this one:
  13. 13. A DSL is...
  14. 14. A specific tool for a specific job
  15. 15. A specific tool for a specific job
  16. 16. Think about your job!
  17. 17. Feel like this?
  18. 18. ...
  19. 19. because
  20. 20. you
  21. 21. need
  22. 22. to
  23. 23. write
  24. 24. THIS?
  25. 25. THIS?
  26. 26. Wrong Level of Abstraction! http://www.flickr.com/photos/rykerstribe/3222969466/
  27. 27. @SuppressWarnings("serial") @Entity @Table(name = "CUSTOMER_INFO") public class CustomerInfo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idSeq") @SequenceGenerator(name = "idSeq", sequenceName = "CUST_SEQ", allocationSize = 1) @Column(name = "CUST_ID", nullable = false) private String customerId; public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerId() { return customerId; } @Column(name = "EMAIL", nullable = false, length = 128) private String emailAddress; public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { String oldValue = emailAddress; this.emailAddress = emailAddress; firePropertyChangedEvent("emailAddress", oldValue, this.emailAddress); }
  28. 28. @SuppressWarnings("serial") @Entity @Table(name = "CUSTOMER_INFO") public class CustomerInfo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idSeq") @SequenceGenerator(name = "idSeq", sequenceName = "CUST_SEQ", allocationSize = 1) @Column(name = "CUST_ID", nullable = false) private String customerId; public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerId() { return customerId; } @Column(name = "EMAIL", nullable = false, length = 128) private String emailAddress; public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { String oldValue = emailAddress; this.emailAddress = emailAddress; firePropertyChangedEvent("emailAddress", oldValue, this.emailAddress); }
  29. 29. entity CustomerInfo (id=CUST_ID, sequenceName=CUST_SEQ) { String emailAddress (notNull, length = 128) }
  30. 30. entity CustomerInfo (id=CUST_ID, sequenceName=CUST_SEQ) { String emailAddress (notNull, length = 128) } Bean DAO (POJO)
  31. 31. Demo Creating an Entity DSL in 3 Simple Steps
  32. 32. ➊ Create a DSL
  33. 33. Define the Grammar
  34. 34. Compile the Grammar
  35. 35. Start the Runtime Workbench
  36. 36. Start Using the DSL
  37. 37.
  38. 38. ➋ Pimp My Write
  39. 39.
  40. 40. Create a Label Provider
  41. 41. ➌ Add a Generator
  42. 42. Adding a Builder
  43. 43.
  44. 44. Concentrate on Essentials
  45. 45. Higher Efficiency
  46. 46. Better Maintainability http://www.flickr.com/photos/flyforfun/2638180406/
  47. 47. No More Boring Code
  48. 48. Twitter: @xtext http://www.xtext.org
  49. 49. Committers Heiko Sven Moritz Peter Dennis Jan Patrick Sebastian Michael Knut Behrens Efftinge Eysholdt Friese Hübner Köhnlein Schönbach Zarnekow Clay Wannheden Individual

×