際際滷

際際滷Share a Scribd company logo
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

                             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
                           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
                                          
                             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
                                          
                             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
Xtext Eclipse Demo Camp Berlin
?
Right tool for the job?
Your trusty swiss army knife!
Youd 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 speci鍖c tool
for a speci鍖c job
A speci鍖c tool
for a speci鍖c job
Think about your job!
Feel like this?
...
because
you
need
to
write
THIS?
THIS?
Wrong Level of Abstraction!
http://www.鍖ickr.com/photos/rykerstribe/3222969466/
Xtext Eclipse Demo Camp Berlin
@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);
	   }
@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);
	   }
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)
	
}




               Bean
                         DAO
              (POJO)
Demo
Creating an Entity DSL in 3 Simple Steps

Create a DSL
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
De鍖ne the Grammar
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Compile the Grammar
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Start the Runtime Workbench
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Start Using the DSL
Xtext Eclipse Demo Camp Berlin

Pimp My Write
Xtext Eclipse Demo Camp Berlin
Create a Label Provider
Xtext Eclipse Demo Camp Berlin

Add a Generator
Xtext Eclipse Demo Camp Berlin
Xtext Eclipse Demo Camp Berlin
Adding a Builder
Xtext Eclipse Demo Camp Berlin
Concentrate on
  Essentials
Higher Ef鍖ciency
Better Maintainability




http://www.鍖ickr.com/photos/鍖yforfun/2638180406/
No More Boring Code
Twitter: @xtext
http://www.xtext.org
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

More Related Content

Xtext Eclipse Demo Camp Berlin