SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
User-Interface
   Programmierung mit
      externen DSLs
       Sven Efftinge, Jan Köhnlein (itemis AG)




                                                 1




Ausgangslage




• DB-Anwendung
• Oracle DB
• OracleForms
                                                 2
Zielarchitektur



• Oracle DB
• Java Rich Client
• JPA
• Spring
• Swing / JGoodies Forms   3




Mengengerüst
 • 1722 Tabellen
 • 19572 Spalten
 • über 300 Forms

Aufgabe
  • Abstraktionen finden
  • Code vereinfachen
                           4
Domänenmodel
                                                                                          5




@SuppressWarnings(quot;serialquot;)
@Entity
 Entity
@Table(name = quot;BUCHUNGSKREISE_Fquot;)
               BUCHUNGSKREISE_F
public class BuchungskreiseF extends AbstractEntity implements Serializable {
!

!   @SuppressWarnings(quot;unusedquot;)
!   @Id
     Id
!   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;bkrIdSeqquot;)
!   @SequenceGenerator(name = quot;bkrIdSeqquot;, sequenceName = quot;BKR_SEQquot;, allocationSize = 1)
                                                          BKR_SEQ
!   @Column(name = quot;BKR_IDquot;, 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 = quot;KONTO_NRquot;, 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(quot;kontoNrquot;, oldValue, this.kontoNr);
!   }
                                                                                          6
!   @Column(name = quot;RG_NR_BKR_IDENTIFIKATORquot;, nullable = false, length = 1)
!   private Long rgNrBkrIdentifikator;

!   public Long getRgNrBkrIdentifikator() {
@SuppressWarnings(quot;serialquot;)
@Entity
 Entity
@Table(name = quot;BUCHUNGSKREISE_Fquot;)
               BUCHUNGSKREISE_F
public class BuchungskreiseF extends AbstractEntity implements Serializable {
!

!   @SuppressWarnings(quot;unusedquot;)
!   @Id
     Id
!   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;bkrIdSeqquot;)
!   @SequenceGenerator(name = quot;bkrIdSeqquot;, sequenceName = quot;BKR_SEQquot;, allocationSize = 1)
                                                          BKR_SEQ
!   @Column(name = quot;BKR_IDquot;, 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 = quot;KONTO_NRquot;, 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(quot;kontoNrquot;, oldValue, this.kontoNr);
!   }
                                                                                          6
!   @Column(name = quot;RG_NR_BKR_IDENTIFIKATORquot;, nullable = false, length = 1)
!   private Long rgNrBkrIdentifikator;

!   public Long getRgNrBkrIdentifikator() {
!   !   return rgNrBkrIdentifikator;
!   }

!   public void setRgNrBkrIdentifikator(final Long rgNrBkrIdentifikator) {
!   !   Long oldValue = this.rgNrBkrIdentifikator;


         External DSL mit TMF Xtext
!   !   this.rgNrBkrIdentifikator = rgNrBkrIdentifikator;
!   !   firePropertyChangeEvent(quot;rgNrBkrIdentifikatorquot;, oldValue,
!   !   !   !  this.rgNrBkrIdentifikator);
!   }

    @Column(name = quot;REFERENZCODE_KONTO_NRquot;,BUCHUNGSKREISE_F
!                                           nullable = false, length = 45)
!   private String referenzcodeKontoNr;

    entity BuchungskreiseF
!    public String getReferenzcodeKontoNr() {
     ! (id=bkrId sequenceName=BKR_SEQ) {
!        return referenzcodeKontoNr;
!   }


         String kontoNr
!   public void setReferenzcodeKontoNr(final String referenzcodeKontoNr) {
!   !   String oldValue = this.referenzcodeKontoNr;
                                                 RG_NR_BKR_IDENTIFIKATOR
!   !   this.referenzcodeKontoNr = referenzcodeKontoNr;
!   !   firePropertyChangeEvent(quot;referenzcodeKontoNrquot;, oldValue,
         Long rgNrBkrIdentifikator
!   !   !   !  this.referenzcodeKontoNr);
!   }


         String referenzcodeKontoNr
!   @Column(name = quot;PC_NR_RGquot;, nullable = false, length = 45)
!   private String pcNrRg;

!   public String getPcNrRg() {
    }
!    !  return pcNrRg;
!   }

!   public void setPcNrRg(final String pcNrRg) {
!   !   String oldValue = this.pcNrRg;
!   !   this.pcNrRg = pcNrRg;
                                                                                          7
!   !   firePropertyChangeEvent(quot;pcNrRgquot;, oldValue, this.pcNrRg);
!   }

!   @Column(name = quot;PC_NR_PVAquot;, nullable = false, length = 45)
!   private String pcNrPva;
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


                                                                                                                                             8




                                                                                                                                             9
Formulare

            10




            11
public class PersonenForm extends
Form<Personen> {




                                                         11




               public class PersonenForm extends
               Form<Personen> {




             public class PersonenHauptSubForm extends
         SubForm<Personen> {




                                                         11
public class PersonenForm extends
        Form<Personen> {




                                                                     public class PersonenHauptSubForm extends
                                                                 SubForm<Personen> {




    private JComponent
    vornameTextField;




                                                                                                                 11




        public class PersonenForm extends
        Form<Personen> {




                                                                     public class PersonenHauptSubForm extends
                                                                 SubForm<Personen> {




    @Override
    protected void initComponents() {
       ...
       vornameTextField =
       builder.createTextField(desc.vorname(),
                                            private JComponent
                                            vornameTextField;




           Editable.PROPERTY_DEFAULT,
           MANDATORY);
!   ! gepardBuilder.setNoLeadingBlanks
           (vornameTextField);




                                                                                                                 11
public class PersonenForm extends
        Form<Personen> {




                                                                                          public class PersonenHauptSubForm extends
                                                                                      SubForm<Personen> {




    @Override
!   protected JComponent buildPanel() {
       TwoColumnsPanelBuilder builder =                              @Override
                                                                     protected void initComponents() {
                                                                        ...



           TwoColumnsPanelBuilder.instance(getBuilderFactory(),
                                                                        vornameTextField =
                                            private JComponent
                                                                        builder.createTextField(desc.vorname(),
                                            vornameTextField;
                                                                            Editable.PROPERTY_DEFAULT,
                                                                            MANDATORY);
                                                                 !   ! gepardBuilder.setNoLeadingBlanks



              getResourceMap());
                                                                            (vornameTextField);




       ...
       builder.add(quot;vornamequot;, vornameTextField);

!




                                                                                                                                                                      11




                                     GUI-Builder
                                                                                                                                      •   WYSIWYG

                                                                                                                                      •   teilweise mit Databinding


                                                                                                                                      •   zu viele Freiheitsgrade

                                                                                                                                      •   Referenz auf Java-Code,
                                                                                                                                          nicht auf Domain-DSL




                                                                                                                                                                      12
Graphische GUI-DSL




                     13




Graphische GUI-DSL




                     13
ID          NAME    PROP1    DATE    ATTR1
ID        NAME   PROP1        DATE   ATTR1




                                                                                                                                                        Referenzen
                                          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



                                                                           model : gepard;
                                                                           import quot;platform:/resource/com.affichage.it21.gp.dao/src/main/model/types.daoquot;

                                                                           com.affichage.it21.gp.dao {

                                                                      !                 flaechen       {
                                                                      !                 !              readOnly entity WaehrungF (id =(rvLowValue)) {
                                                                      !                 !              }
                                                                      !                 !              readOnly entity GepardVerwendungPvF (id =(pvOid)) {
                                                                      !                 !              !        temporal manyToOne GeschpartnerAllBsF geschpartner (joinColum
                                                                      !                 !              }
                                                                      !                 }
                                                                      !
                                                                      !                 verkauf       {
                                                                      !                 !              readOnly       entity GepardVerwendungKdvtF (id =(kdvtId)) {
                                                                      !                 !              !              temporal notNull manyToOne GeschpartnerAllBsF geschpartner (j
                                                                      !                 !              !              notNull Number istLangfrist (castTo=Boolean)
                                                                      !                 !              !              notNull Number istLokaldispo (castTo=Boolean)
                                                                      !                 !              }
                                                                      !                 }

                                                                      !                 gepard {
                                                                      !                 !        readOnly entity AbcKundenF (id = (rvLowValue)) {
                                                                      !                 !




                                                                                                                                                                                      14




                                        Validierung
                                                                                                                                                                                      15
16




addValidator(new Validator<Institutionen>() {
! ! ! @Override
! ! ! public ValidationResult validate(final Institutionen institution) {
! ! ! ! final ValidationResult result = new ValidationResult();
! ! ! ! if (institution != null
                  && institution.getEsrNr() != null
!!!!!              && !CheckUtils.checkPcKontoNrPruefziffer(
                        Long.parseLong(institution.getEsrNr())) {
! ! ! ! ! result.add(new SimpleValidationMessage(
                        getResourceMap().getString(quot;validation.esr.msgquot;),
                        Severity.ERROR, getModel(Institutionen.DESC.esrNr())));
!!!!}
! ! ! ! return result;
!!!}
! ! });




                                                                                  17
Framework-Code




addValidator(new Validator<Institutionen>() {
! ! ! @Override
! ! ! public ValidationResult validate(final Institutionen institution) {
! ! ! ! final ValidationResult result = new ValidationResult();
! ! ! ! if (institution != null
                  && institution.getEsrNr() != null
!!!!!              && !CheckUtils.checkPcKontoNrPruefziffer(
                        Long.parseLong(institution.getEsrNr())) {
! ! ! ! ! result.add(new SimpleValidationMessage(
                        getResourceMap().getString(quot;validation.esr.msgquot;),
                        Severity.ERROR, getModel(Institutionen.DESC.esrNr())));
!!!!}
! ! ! ! return result;
!!!}
! ! });




                                                                                  17




Framework-Code
Nullpointer abfragen



addValidator(new Validator<Institutionen>() {
! ! ! @Override
! ! ! public ValidationResult validate(final Institutionen institution) {
! ! ! ! final ValidationResult result = new ValidationResult();
! ! ! ! if (institution != null
                  && institution.getEsrNr() != null
!!!!!              && !CheckUtils.checkPcKontoNrPruefziffer(
                        Long.parseLong(institution.getEsrNr())) {
! ! ! ! ! result.add(new SimpleValidationMessage(
                        getResourceMap().getString(quot;validation.esr.msgquot;),
                        Severity.ERROR, getModel(Institutionen.DESC.esrNr())));
!!!!}
! ! ! ! return result;
!!!}
! ! });




                                                                                  17
Framework-Code
Nullpointer abfragen
Static imports

addValidator(new Validator<Institutionen>() {
! ! ! @Override
! ! ! public ValidationResult validate(final Institutionen institution) {
! ! ! ! final ValidationResult result = new ValidationResult();
! ! ! ! if (institution != null
                  && institution.getEsrNr() != null
!!!!!              && !CheckUtils.checkPcKontoNrPruefziffer(
                        Long.parseLong(institution.getEsrNr())) {
! ! ! ! ! result.add(new SimpleValidationMessage(
                        getResourceMap().getString(quot;validation.esr.msgquot;),
                        Severity.ERROR, getModel(Institutionen.DESC.esrNr())));
!!!!}
! ! ! ! return result;
!!!}
! ! });




                                                                                  17




Framework-Code
Nullpointer abfragen
Static imports
Bibliotheks Methoden definieren und benutzen
addValidator(new Validator<Institutionen>() {
! ! ! @Override
! ! ! public ValidationResult validate(final Institutionen institution) {
! ! ! ! final ValidationResult result = new ValidationResult();
! ! ! ! if (institution != null
                  && institution.getEsrNr() != null
!!!!!              && !CheckUtils.checkPcKontoNrPruefziffer(
                        Long.parseLong(institution.getEsrNr())) {
! ! ! ! ! result.add(new SimpleValidationMessage(
                 error(quot;validation.esr.msgquot;, desc.esrNr());
                        getResourceMap().getString(quot;validation.esr.msgquot;),
                        Severity.ERROR, getModel(Institutionen.DESC.esrNr())));
!!!!}
! ! ! ! return result;
!!!}
! ! });




                                                                                  17
Internal DSL mit Java
 !   void checkEsrMsg() {
 !   ! if (!checkPcKontoNrPruefziffer(parseLong(_this.getEsrNr())))
 !   ! ! error(quot;validation.esr.msgquot;,desc.esrNr());
 !   }




     • Junit-like
     • fängt Nullpointer-Exceptions



                                                                      18




Warum Abstrahieren?


                                                                      19
Anzahl Zeichen im Vergleich (nur Entity-DSL)
                                         29248 (DSL)
  Mit DSL                              + 49948 (Codegenerator)
                                       + 170 * Anzahl Entitäten
  Ohne DSL                             7303 * Anzahl Entitäten
300 TZ

240 TZ

                   11 Entitäten
180 TZ

120 TZ

 60 TZ

  0 TZ
         0                               20                       40
                                                                       20




         Software Life-Cycle Costs (Schach 2002)


                     2% 5%
                             6%
                                                 Requirements
                                  5%
                                                 Specification
                                                 Design
                                   7%

                                                 Coding
                                   8%            Unit Testing
                                                 Integration
             67%

                                                 Maintenance




                                                                       21
Fragen?



          22

Mais conteúdo relacionado

Mais procurados

Clean code and Code Smells
Clean code and Code SmellsClean code and Code Smells
Clean code and Code SmellsMario Sangiorgio
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)brian d foy
 
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Guillaume Laforge
 
Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)brian d foy
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Pythonkwatch
 
Functional Programming with Groovy
Functional Programming with GroovyFunctional Programming with Groovy
Functional Programming with GroovyArturo Herrero
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mark Needham
 
What did you miss in Java from 9-13?
What did you miss in Java from 9-13?What did you miss in Java from 9-13?
What did you miss in Java from 9-13?relix1988
 
Reading the .explain() Output
Reading the .explain() OutputReading the .explain() Output
Reading the .explain() OutputMongoDB
 
Agile 2012 Simple Design Applied
Agile 2012 Simple Design AppliedAgile 2012 Simple Design Applied
Agile 2012 Simple Design AppliedDeclan Whelan
 
Querydsl fin jug - june 2012
Querydsl   fin jug - june 2012Querydsl   fin jug - june 2012
Querydsl fin jug - june 2012Timo Westkämper
 
03 introduction to graph databases
03   introduction to graph databases03   introduction to graph databases
03 introduction to graph databasesNeo4j
 
A Critical Look at Fixtures
A Critical Look at FixturesA Critical Look at Fixtures
A Critical Look at FixturesActsAsCon
 
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology News
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology NewsHacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology News
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology NewsChristoph Matthies
 
Refactoring group 1 - chapter 3,4,6
Refactoring   group 1 - chapter 3,4,6Refactoring   group 1 - chapter 3,4,6
Refactoring group 1 - chapter 3,4,6Duy Lâm
 

Mais procurados (20)

Clean code
Clean codeClean code
Clean code
 
Simple Design
Simple DesignSimple Design
Simple Design
 
Clean code
Clean codeClean code
Clean code
 
Clean code and Code Smells
Clean code and Code SmellsClean code and Code Smells
Clean code and Code Smells
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)
 
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
 
Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)
 
Clean code
Clean codeClean code
Clean code
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Python
 
Functional Programming with Groovy
Functional Programming with GroovyFunctional Programming with Groovy
Functional Programming with Groovy
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#
 
What did you miss in Java from 9-13?
What did you miss in Java from 9-13?What did you miss in Java from 9-13?
What did you miss in Java from 9-13?
 
Reading the .explain() Output
Reading the .explain() OutputReading the .explain() Output
Reading the .explain() Output
 
Agile 2012 Simple Design Applied
Agile 2012 Simple Design AppliedAgile 2012 Simple Design Applied
Agile 2012 Simple Design Applied
 
Querydsl fin jug - june 2012
Querydsl   fin jug - june 2012Querydsl   fin jug - june 2012
Querydsl fin jug - june 2012
 
03 introduction to graph databases
03   introduction to graph databases03   introduction to graph databases
03 introduction to graph databases
 
A Critical Look at Fixtures
A Critical Look at FixturesA Critical Look at Fixtures
A Critical Look at Fixtures
 
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology News
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology NewsHacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology News
Hacker News vs. Slashdot—Reputation Systems in Crowdsourced Technology News
 
Refactoring group 1 - chapter 3,4,6
Refactoring   group 1 - chapter 3,4,6Refactoring   group 1 - chapter 3,4,6
Refactoring group 1 - chapter 3,4,6
 

Semelhante a Domain-Specific Languages in der Praxis

Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Polyglot persistence with Spring Data
Polyglot persistence with Spring DataPolyglot persistence with Spring Data
Polyglot persistence with Spring DataCorneil du Plessis
 
Using DAOs without implementing them
Using DAOs without implementing themUsing DAOs without implementing them
Using DAOs without implementing thembenfante
 
Best of build 2021 - C# 10 & .NET 6
Best of build 2021 -  C# 10 & .NET 6Best of build 2021 -  C# 10 & .NET 6
Best of build 2021 - C# 10 & .NET 6Moaid Hathot
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
 
Lesson07-UsernamePasswordAuthenticationFilter.pdf
Lesson07-UsernamePasswordAuthenticationFilter.pdfLesson07-UsernamePasswordAuthenticationFilter.pdf
Lesson07-UsernamePasswordAuthenticationFilter.pdfScott Anderson
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Stephan Schmidt
 
Buenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationBuenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationMark Proctor
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpointwebhostingguy
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityGeorgePeterBanyard
 
MDSD with Eclipse @ JUG Hamburg
MDSD with Eclipse @ JUG HamburgMDSD with Eclipse @ JUG Hamburg
MDSD with Eclipse @ JUG HamburgSebastian Zarnekow
 

Semelhante a Domain-Specific Languages in der Praxis (20)

Kick Start Jpa
Kick Start JpaKick Start Jpa
Kick Start Jpa
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Polyglot persistence with Spring Data
Polyglot persistence with Spring DataPolyglot persistence with Spring Data
Polyglot persistence with Spring Data
 
Using DAOs without implementing them
Using DAOs without implementing themUsing DAOs without implementing them
Using DAOs without implementing them
 
Best of build 2021 - C# 10 & .NET 6
Best of build 2021 -  C# 10 & .NET 6Best of build 2021 -  C# 10 & .NET 6
Best of build 2021 - C# 10 & .NET 6
 
Classes and Inheritance
Classes and InheritanceClasses and Inheritance
Classes and Inheritance
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Lesson07-UsernamePasswordAuthenticationFilter.pdf
Lesson07-UsernamePasswordAuthenticationFilter.pdfLesson07-UsernamePasswordAuthenticationFilter.pdf
Lesson07-UsernamePasswordAuthenticationFilter.pdf
 
Django
DjangoDjango
Django
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Dev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdfDev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdf
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
 
Buenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationBuenos Aires Drools Expert Presentation
Buenos Aires Drools Expert Presentation
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing Insanity
 
MDSD with Eclipse @ JUG Hamburg
MDSD with Eclipse @ JUG HamburgMDSD with Eclipse @ JUG Hamburg
MDSD with Eclipse @ JUG Hamburg
 
Os Leonard
Os LeonardOs Leonard
Os Leonard
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
 

Mais de Sven Efftinge

Parsing Expression With Xtext
Parsing Expression With XtextParsing Expression With Xtext
Parsing Expression With XtextSven Efftinge
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With XtextSven Efftinge
 
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendAuto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendSven Efftinge
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with XtendSven Efftinge
 
Codegeneration With Xtend
Codegeneration With XtendCodegeneration With Xtend
Codegeneration With XtendSven Efftinge
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Sven Efftinge
 
Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Sven Efftinge
 
This Is Not Your Father's Java
This Is Not Your Father's JavaThis Is Not Your Father's Java
This Is Not Your Father's JavaSven Efftinge
 
Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Sven Efftinge
 
Xtext at MDD Day 2010
Xtext at MDD Day 2010Xtext at MDD Day 2010
Xtext at MDD Day 2010Sven Efftinge
 
Dependency Injection for Eclipse developers
Dependency Injection for Eclipse developersDependency Injection for Eclipse developers
Dependency Injection for Eclipse developersSven Efftinge
 
Challenges In Dsl Design
Challenges In Dsl DesignChallenges In Dsl Design
Challenges In Dsl DesignSven Efftinge
 
Code Generation in Agile Projects
Code Generation in Agile ProjectsCode Generation in Agile Projects
Code Generation in Agile ProjectsSven Efftinge
 
Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Sven Efftinge
 

Mais de Sven Efftinge (20)

Parsing Expression With Xtext
Parsing Expression With XtextParsing Expression With Xtext
Parsing Expression With Xtext
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
 
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendAuto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with Xtend
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
 
Codegeneration With Xtend
Codegeneration With XtendCodegeneration With Xtend
Codegeneration With Xtend
 
Gwt and Xtend
Gwt and XtendGwt and Xtend
Gwt and Xtend
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)
 
Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012
 
Eclipse Xtend
Eclipse XtendEclipse Xtend
Eclipse Xtend
 
This Is Not Your Father's Java
This Is Not Your Father's JavaThis Is Not Your Father's Java
This Is Not Your Father's Java
 
Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]
 
Xtext at MDD Day 2010
Xtext at MDD Day 2010Xtext at MDD Day 2010
Xtext at MDD Day 2010
 
Dependency Injection for Eclipse developers
Dependency Injection for Eclipse developersDependency Injection for Eclipse developers
Dependency Injection for Eclipse developers
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Challenges In Dsl Design
Challenges In Dsl DesignChallenges In Dsl Design
Challenges In Dsl Design
 
Code Generation in Agile Projects
Code Generation in Agile ProjectsCode Generation in Agile Projects
Code Generation in Agile Projects
 
Xtext Eclipse Con
Xtext Eclipse ConXtext Eclipse Con
Xtext Eclipse Con
 
Generic Editor
Generic EditorGeneric Editor
Generic Editor
 
Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)
 

Último

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Último (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Domain-Specific Languages in der Praxis

  • 1. User-Interface Programmierung mit externen DSLs Sven Efftinge, Jan Köhnlein (itemis AG) 1 Ausgangslage • DB-Anwendung • Oracle DB • OracleForms 2
  • 2. Zielarchitektur • Oracle DB • Java Rich Client • JPA • Spring • Swing / JGoodies Forms 3 Mengengerüst • 1722 Tabellen • 19572 Spalten • über 300 Forms Aufgabe • Abstraktionen finden • Code vereinfachen 4
  • 3. Domänenmodel 5 @SuppressWarnings(quot;serialquot;) @Entity Entity @Table(name = quot;BUCHUNGSKREISE_Fquot;) BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { ! ! @SuppressWarnings(quot;unusedquot;) ! @Id Id ! @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;bkrIdSeqquot;) ! @SequenceGenerator(name = quot;bkrIdSeqquot;, sequenceName = quot;BKR_SEQquot;, allocationSize = 1) BKR_SEQ ! @Column(name = quot;BKR_IDquot;, 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 = quot;KONTO_NRquot;, 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(quot;kontoNrquot;, oldValue, this.kontoNr); ! } 6 ! @Column(name = quot;RG_NR_BKR_IDENTIFIKATORquot;, nullable = false, length = 1) ! private Long rgNrBkrIdentifikator; ! public Long getRgNrBkrIdentifikator() {
  • 4. @SuppressWarnings(quot;serialquot;) @Entity Entity @Table(name = quot;BUCHUNGSKREISE_Fquot;) BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { ! ! @SuppressWarnings(quot;unusedquot;) ! @Id Id ! @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;bkrIdSeqquot;) ! @SequenceGenerator(name = quot;bkrIdSeqquot;, sequenceName = quot;BKR_SEQquot;, allocationSize = 1) BKR_SEQ ! @Column(name = quot;BKR_IDquot;, 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 = quot;KONTO_NRquot;, 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(quot;kontoNrquot;, oldValue, this.kontoNr); ! } 6 ! @Column(name = quot;RG_NR_BKR_IDENTIFIKATORquot;, nullable = false, length = 1) ! private Long rgNrBkrIdentifikator; ! public Long getRgNrBkrIdentifikator() { ! ! return rgNrBkrIdentifikator; ! } ! public void setRgNrBkrIdentifikator(final Long rgNrBkrIdentifikator) { ! ! Long oldValue = this.rgNrBkrIdentifikator; External DSL mit TMF Xtext ! ! this.rgNrBkrIdentifikator = rgNrBkrIdentifikator; ! ! firePropertyChangeEvent(quot;rgNrBkrIdentifikatorquot;, oldValue, ! ! ! ! this.rgNrBkrIdentifikator); ! } @Column(name = quot;REFERENZCODE_KONTO_NRquot;,BUCHUNGSKREISE_F ! nullable = false, length = 45) ! private String referenzcodeKontoNr; entity BuchungskreiseF ! public String getReferenzcodeKontoNr() { ! (id=bkrId sequenceName=BKR_SEQ) { ! return referenzcodeKontoNr; ! } String kontoNr ! public void setReferenzcodeKontoNr(final String referenzcodeKontoNr) { ! ! String oldValue = this.referenzcodeKontoNr; RG_NR_BKR_IDENTIFIKATOR ! ! this.referenzcodeKontoNr = referenzcodeKontoNr; ! ! firePropertyChangeEvent(quot;referenzcodeKontoNrquot;, oldValue, Long rgNrBkrIdentifikator ! ! ! ! this.referenzcodeKontoNr); ! } String referenzcodeKontoNr ! @Column(name = quot;PC_NR_RGquot;, nullable = false, length = 45) ! private String pcNrRg; ! public String getPcNrRg() { } ! ! return pcNrRg; ! } ! public void setPcNrRg(final String pcNrRg) { ! ! String oldValue = this.pcNrRg; ! ! this.pcNrRg = pcNrRg; 7 ! ! firePropertyChangeEvent(quot;pcNrRgquot;, oldValue, this.pcNrRg); ! } ! @Column(name = quot;PC_NR_PVAquot;, nullable = false, length = 45) ! private String pcNrPva;
  • 5. 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 8 9
  • 6. Formulare 10 11
  • 7. public class PersonenForm extends Form<Personen> { 11 public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { 11
  • 8. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { private JComponent vornameTextField; 11 public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { @Override protected void initComponents() { ... vornameTextField = builder.createTextField(desc.vorname(), private JComponent vornameTextField; Editable.PROPERTY_DEFAULT, MANDATORY); ! ! gepardBuilder.setNoLeadingBlanks (vornameTextField); 11
  • 9. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { @Override ! protected JComponent buildPanel() { TwoColumnsPanelBuilder builder = @Override protected void initComponents() { ... TwoColumnsPanelBuilder.instance(getBuilderFactory(), vornameTextField = private JComponent builder.createTextField(desc.vorname(), vornameTextField; Editable.PROPERTY_DEFAULT, MANDATORY); ! ! gepardBuilder.setNoLeadingBlanks getResourceMap()); (vornameTextField); ... builder.add(quot;vornamequot;, vornameTextField); ! 11 GUI-Builder • WYSIWYG • teilweise mit Databinding • zu viele Freiheitsgrade • Referenz auf Java-Code, nicht auf Domain-DSL 12
  • 10. Graphische GUI-DSL 13 Graphische GUI-DSL 13
  • 11. ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Referenzen 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 model : gepard; import quot;platform:/resource/com.affichage.it21.gp.dao/src/main/model/types.daoquot; com.affichage.it21.gp.dao { ! flaechen { ! ! readOnly entity WaehrungF (id =(rvLowValue)) { ! ! } ! ! readOnly entity GepardVerwendungPvF (id =(pvOid)) { ! ! ! temporal manyToOne GeschpartnerAllBsF geschpartner (joinColum ! ! } ! } ! ! verkauf { ! ! readOnly entity GepardVerwendungKdvtF (id =(kdvtId)) { ! ! ! temporal notNull manyToOne GeschpartnerAllBsF geschpartner (j ! ! ! notNull Number istLangfrist (castTo=Boolean) ! ! ! notNull Number istLokaldispo (castTo=Boolean) ! ! } ! } ! gepard { ! ! readOnly entity AbcKundenF (id = (rvLowValue)) { ! ! 14 Validierung 15
  • 12. 16 addValidator(new Validator<Institutionen>() { ! ! ! @Override ! ! ! public ValidationResult validate(final Institutionen institution) { ! ! ! ! final ValidationResult result = new ValidationResult(); ! ! ! ! if (institution != null && institution.getEsrNr() != null !!!!! && !CheckUtils.checkPcKontoNrPruefziffer( Long.parseLong(institution.getEsrNr())) { ! ! ! ! ! result.add(new SimpleValidationMessage( getResourceMap().getString(quot;validation.esr.msgquot;), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); !!!!} ! ! ! ! return result; !!!} ! ! }); 17
  • 13. Framework-Code addValidator(new Validator<Institutionen>() { ! ! ! @Override ! ! ! public ValidationResult validate(final Institutionen institution) { ! ! ! ! final ValidationResult result = new ValidationResult(); ! ! ! ! if (institution != null && institution.getEsrNr() != null !!!!! && !CheckUtils.checkPcKontoNrPruefziffer( Long.parseLong(institution.getEsrNr())) { ! ! ! ! ! result.add(new SimpleValidationMessage( getResourceMap().getString(quot;validation.esr.msgquot;), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); !!!!} ! ! ! ! return result; !!!} ! ! }); 17 Framework-Code Nullpointer abfragen addValidator(new Validator<Institutionen>() { ! ! ! @Override ! ! ! public ValidationResult validate(final Institutionen institution) { ! ! ! ! final ValidationResult result = new ValidationResult(); ! ! ! ! if (institution != null && institution.getEsrNr() != null !!!!! && !CheckUtils.checkPcKontoNrPruefziffer( Long.parseLong(institution.getEsrNr())) { ! ! ! ! ! result.add(new SimpleValidationMessage( getResourceMap().getString(quot;validation.esr.msgquot;), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); !!!!} ! ! ! ! return result; !!!} ! ! }); 17
  • 14. Framework-Code Nullpointer abfragen Static imports addValidator(new Validator<Institutionen>() { ! ! ! @Override ! ! ! public ValidationResult validate(final Institutionen institution) { ! ! ! ! final ValidationResult result = new ValidationResult(); ! ! ! ! if (institution != null && institution.getEsrNr() != null !!!!! && !CheckUtils.checkPcKontoNrPruefziffer( Long.parseLong(institution.getEsrNr())) { ! ! ! ! ! result.add(new SimpleValidationMessage( getResourceMap().getString(quot;validation.esr.msgquot;), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); !!!!} ! ! ! ! return result; !!!} ! ! }); 17 Framework-Code Nullpointer abfragen Static imports Bibliotheks Methoden definieren und benutzen addValidator(new Validator<Institutionen>() { ! ! ! @Override ! ! ! public ValidationResult validate(final Institutionen institution) { ! ! ! ! final ValidationResult result = new ValidationResult(); ! ! ! ! if (institution != null && institution.getEsrNr() != null !!!!! && !CheckUtils.checkPcKontoNrPruefziffer( Long.parseLong(institution.getEsrNr())) { ! ! ! ! ! result.add(new SimpleValidationMessage( error(quot;validation.esr.msgquot;, desc.esrNr()); getResourceMap().getString(quot;validation.esr.msgquot;), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); !!!!} ! ! ! ! return result; !!!} ! ! }); 17
  • 15. Internal DSL mit Java ! void checkEsrMsg() { ! ! if (!checkPcKontoNrPruefziffer(parseLong(_this.getEsrNr()))) ! ! ! error(quot;validation.esr.msgquot;,desc.esrNr()); ! } • Junit-like • fängt Nullpointer-Exceptions 18 Warum Abstrahieren? 19
  • 16. Anzahl Zeichen im Vergleich (nur Entity-DSL) 29248 (DSL) Mit DSL + 49948 (Codegenerator) + 170 * Anzahl Entitäten Ohne DSL 7303 * Anzahl Entitäten 300 TZ 240 TZ 11 Entitäten 180 TZ 120 TZ 60 TZ 0 TZ 0 20 40 20 Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements 5% Specification Design 7% Coding 8% Unit Testing Integration 67% Maintenance 21
  • 17. Fragen? 22