Eclipse Banking Day

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite & 1 Group

    Eclipse Banking Day - Presentation Transcript

    1. Modeling Industry Data with Eclipse Modeling Project Sven Efftinge (itemis AG) Dr. Jan Koehnlein (itemis AG)
    2. Frameworks and Tools used to design, use and process Domain-Specific Languages
    3. EMF
    4. GMF EMF
    5. GMF TMF EMF
    6. GMF TMF EMF M2M
    7. GMF TMF EMF M2M M2T
    8. Experiences made in a real world project
    9. Initial Situation • DB-Application • Oracle DB • Oracle Forms
    10. Goal • Oracle DB • Java Rich Client • JPA • Spring • Swing / JGoodies Forms
    11. Quantities • 1722 tables
    12. Quantities • 1722 tables • 19572 columns
    13. Quantities • 1722 tables • 19572 columns • over 300 Forms
    14. Quantities • 1722 tables • 19572 columns • over 300 Forms Our job
    15. Quantities • 1722 tables • 19572 columns • over 300 Forms Our job • Find suitable abstractions
    16. Quantities • 1722 tables • 19572 columns • over 300 Forms Our job • Find suitable abstractions • Simplify code
    17. Domain Model
    18. @SuppressWarnings(\"serial\") @Entity Entity @Table(name = \"BUCHUNGSKREISE_F\") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings(\"unused\") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"bkrIdSeq\") @SequenceGenerator(name = \"bkrIdSeq\", sequenceName = \"BKR_SEQ\", allocationSize = 1) BKR_SEQ @Column(name = \"BKR_ID\", 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 = \"KONTO_NR\", 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(\"kontoNr\", oldValue, this.kontoNr); }
    19. @SuppressWarnings(\"serial\") @Entity Entity @Table(name = \"BUCHUNGSKREISE_F\") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings(\"unused\") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"bkrIdSeq\") @SequenceGenerator(name = \"bkrIdSeq\", sequenceName = \"BKR_SEQ\", allocationSize = 1) BKR_SEQ @Column(name = \"BKR_ID\", 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 = \"KONTO_NR\", 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(\"kontoNr\", oldValue, this.kontoNr); }
    20. External DSL with TMF Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr (notNull, length=45) Long rgNrBkrIdentifikator (notNull, length=1) String referenzcodeKontoNr (notNull, length=45) }
    21. External DSL with TMF Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr Long rgNrBkrIdentifikator String referenzcodeKontoNr }
    22. External DSL with TMF Xtext BUCHUNGSKREISE_F entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr RG_NR_BKR_IDENTIFIKATOR Long rgNrBkrIdentifikator String referenzcodeKontoNr }
    23. entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { }
    24. 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
    25. Number of Characters (Domain model DSL) 30.000 (DSL) + 50.000 (code generator) With DSL + 170 / Entity 7000 / Entity Without DSL 300 TZ 240 TZ 11 Entities 180 TZ 120 TZ 60 TZ 0 TZ 0 20 40
    26. Views
    27. public class PersonenForm extends Form<Personen> {
    28. public class PersonenForm extends Form<Personen> {
    29. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> {
    30. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> {
    31. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { private JComponent vornameTextField;
    32. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { private JComponent vornameTextField;
    33. 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);
    34. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { @Override protected void initComponents() { ... vornameTextField = private JComponent builder.createTextField(desc.vorname(), vornameTextField; Editable.PROPERTY_DEFAULT, MANDATORY); gepardBuilder.setNoLeadingBlanks (vornameTextField);
    35. 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(\"vorname\", vornameTextField);
    36. public class PersonenForm extends Form<Personen> { public class PersonenHauptSubForm extends SubForm<Personen> { @Override protected void initComponents() { @Override ... protected JComponent buildPanel() { TwoColumnsPanelBuilder builder = vornameTextField = private JComponent builder.createTextField(desc.vorname(), TwoColumnsPanelBuilder.instance(getBuilderFactory(), vornameTextField; getResourceMap()); Editable.PROPERTY_DEFAULT, MANDATORY); ... builder.add(\"vorname\", vornameTextField); gepardBuilder.setNoLeadingBlanks (vornameTextField);
    37. Why not GUI-Builder? • No control over generated code • Too many details • Do not directly leverage information from the domain models
    38. Graphical GUI-DSL with GMF
    39. Graphical GUI-DSL with GMF
    40. ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Referencing 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 \"platform:/resource/com.affichage.it21.gp.dao/src/main/model/types.dao\" 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)) {
    41. Validation
    42. 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(\"validation.esr.msg\"), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); } return result; } });
    43. Eliminate 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(\"validation.esr.msg\"), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); } return result; } });
    44. Eliminate framework code Avoid repetitive null pointer checks 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(\"validation.esr.msg\"), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); } return result; } });
    45. Eliminate framework code Avoid repetitive null pointer checks Use 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(\"validation.esr.msg\"), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); } return result; } });
    46. Eliminate framework code Avoid repetitive null pointer checks Use static imports Use and define library methods 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(\"validation.esr.msg\", desc.esrNr()); getResourceMap().getString(\"validation.esr.msg\"), Severity.ERROR, getModel(Institutionen.DESC.esrNr()))); } return result; } });
    47. Internal DSL in Java @Check void checkEsrMsg() { if (!checkKontoNrPruefziffer(parseLong(_this.getEsrNr()))) error(\"validation.esr.msg\",desc.esrNr()); } • Junit-like • catches null pointer exceptions
    48. Why do we want to abstract?
    49. Software Life-Cycle Costs (Schach 2002) Requirements Specification Design Coding Unit Testing Integration Maintenance
    50. Software Life-Cycle Costs (Schach 2002) 2% Requirements Specification Design Coding Unit Testing Integration Maintenance
    51. Software Life-Cycle Costs (Schach 2002) 2% 5% Requirements Specification Design Coding Unit Testing Integration Maintenance
    52. Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements Specification Design Coding Unit Testing Integration Maintenance
    53. Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements 5% Specification Design Coding Unit Testing Integration Maintenance
    54. Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements 5% Specification Design 7% Coding Unit Testing Integration Maintenance
    55. Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements 5% Specification Design 7% Coding 8% Unit Testing Integration Maintenance
    56. Software Life-Cycle Costs (Schach 2002) 2% 5% 6% Requirements 5% Specification Design 7% Coding 8% Unit Testing Integration 67% Maintenance
    57. Software maintenance - proportional costs
    58. Software maintenance - proportional costs
    59. Software Rots
    60. Finance related applications of Eclipse Modeling
    61. Questions ?

    + Sven EfftingeSven Efftinge, 9 months ago

    custom

    775 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 775
      • 775 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 34
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events