SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
1




Transforming a 15 year old model-driven
application from C++ to Java
Eric Jan Malotaux
    Code Generation 2012, Cambridge, UK
    2012-03-28
Overview
3
    OVERVIEW



    Who I Am

    The Assignment
    Renovating applications
    The Strategy

    Lessons Learned
    Unsolved Problems
4
    WHO AM I



    Eric Jan Malotaux

    Software Architect with Ordina, ICT service provider in the Netherlands
    Trained as a musician and musicologist
    27 years experience in software development

    What I learned
        Automated procedures (software factory) as important as programming skills
        Communication and trust within a team even more important
    Specialties – anything that speeds up software development
        Software factories – automating as much as possible
        Agile development (extreme programming, Scrum)
        Model-driven code generation
The Assignment
Transforming a 15 year old model-driven application from C++ to Java
6
    THE ASSIGNMENT
    THE APPLICATION

    A very succesful mortgage application

        185 screens
        100 users
        Quarterly releases
        Sizeable model: 200,000 lines (10Mb) of XMI
    Using a proprietary model-driven code generator
    Several interfaces to external systems: queues

    Several native Windows DLL's for complicated calculations
Transforming a 15 year old model-driven application from C++ to Java
8
    THE ASSIGNMENT
    THE MODELER/GENERATOR

    Old, but very complete

    Model in relational tables (DB2)
    Modeler written in MS-Access
    C++ Class Tree to keep model in memory

    Loader containing mapping (DB → Class Tree) knowledge
    Hand-written C++ framework, modeled

        Persistence support classes, including lazy loading
        User Interface support classes
    Action Language: COOL (Common Object Oriented Language)

        Methods on objects
        Actions on UI elements, like buttons
    Implicit metamodel (as far as known)
9
    THE ASSIGNMENT
    WHY TRANSFORM?

    Dependent on outdated C++ compiler and libraries

    Scarce expertise
         Model-driven techniques in general
         The proprietary modeler/generator in particular
         C++
    Modeler/generator maintained, but not further development

    Doesn't fit in Enterprise Architecture
    Difficult to offshore

    Want a mainstream Java web application
    And no code generator anymore please, thank you very much.

         No dependency on proprietary tools
         Current developers where quite happy, though
Renovating applications
Legacy application                                                 Renovated application


       Goals                                                              Goals




   Requirements                             update                     Requirements

         reverse engineering



   Specifications                           update
                                                                       Specifications

         reverse engineering



   Implementatio               Automatic C++ to Java translation       Implementatio
         n                                                                   n
The Strategy
Legacy application                                     Renovated application


      Goals




   Requirements




      FAST                               FAST                      Mod4J
                                                                    FAST
      model               C++       C++ C++
                                        extractor
                                         model       Xtend2
                                                                   mogram
                                                                    model
                        extractor     extractor     generator
    (database)                            (xmi)                 (textual DSL)
                                                                    (xmi)
                                                                      Xtend2
                                                                      Xpand
        C++ generator               C++ generator
                                                                     generator

        C++                                                         Java
   implementatio                                                implementatio
          n                                                           n
Migrating the (meta)models
Old                                                       Intermediate                          New
                                                                (Enterprise Architect)

         SQL                        C++                                 UML                               Ecore
M3


 expressed in        Abstract       expressed in                     expressed in                      expressed in
                     Syntax


         FAST                                                                                            FAST
                                                           EA C++      FAST         EA ecore
M2    metamodel                 “Class Tree”
                                                           import    metamodel       export Expo
                                                                                                       metamodel
      (relational)                                                                              rt      (ecore)
                                                                                            gene
                                                                                                ra
                                                                                                to
                                                                                                 r
     expressed in               expressed in                                                           expressed in
                                                                                            (xten
                                                                                                 d
                                                                                              FMA
                                                                                                2)
                                                                                               gen
                      FMA                           FMA                                            e
         FMA                       Model                                                                  FMA
                                                   expor
M1      model         gen
                      load
                         e
                                   object
                                                      t
                                                                                                   r      model
      (database)                   graph                                                           a      (xmi)
                          r                        (C++)                                           t
                         a                                                                         o
                          t                                                                        r
                         o                                                                         s
                          r                                                                    (xte
                         s                                                                         n
                       (C+                                                                         d
                         +                                                                         2
         FMA                                                                                             FMA
M0     user data
                          )                                                                        )
                                                                                                       application
Ext
                            r
                            a
                     Enterpri
                          se
                            c                                     Legenda
                            t
                     Architect
                            o                                        given
                            r
            FAST        gen
                                  FAST
                                                                    manual
 FAST                       e                 EMF
           “Class                metamo                              tools
metamo                      r               generato
              Tree                   del
    del                     a                    r
                ”                (ecore)                           generated
                            t
                            o
                            r
  FMA                   (xte
                            n      FMA                  FAST
 model     Load/
                            d     model                 model
                                                          FM
(databas   extract
                            2     (XMI)                Java API
                                                            A
     e)
                            )                            gen
                                                             e
                                                             r
                                                             a
                                             FAST            t
 FMA                                         editor          o
 model                                                       r
                                                         (xte
                                                             n
                                                             d
                                   JNA        FMA            2
                                                         FMA )
                                 adapters   example
                                                        (Java)
                                  (Java)     (Java)



  FAST                             FAST
                                            maven/
framewo                          framewo
                                            javac/
     rk                                rk
                                             build
  (C++)                            (Java)


External                         External
 (MQ)                              (MQ)       FMA
    clas                             clas   (JWS/jar    FMA
    ses                              ses         )      data
 (C++)                            (Java)
Lessons Learned
18
     LESSONS LEARNED
     The value of an explicit metamodel

     Help in understanding the model

     Generated export program
     Generated tree editor
     Generated model API

     Basis for a new DSL
19
     LESSONS LEARNED
     Generator architecture

     Consistent naming

     Use an intermediate model
20
     LESSONS LEARNED
     Incompatible source/target architecture

     Layering: classic client → server, modern three-tiered

     Lazy loading assumed in the COOL Action Language
     One Action Language for UI and Class Methods
21
     LESSONS LEARNED
     Know your tools

     Know your tools

         EMF is a great tool, once you obtain a copy of the EMF book
         Xtext2, needed for COOL Parser, difficult to integrate
         Xtend2, nice but still buggy
22
     REMAINING UNSOLVED PROBLEMS



     Eclipse is a hard to tame beast!

         Working combination of (versions of) plugins
         Hard to get rid of red crosses
     Continuous integration
         Maven ↔ OSGi: two worlds
         Eclipse artifacts (not) in public maven repositories
23
     REMAINING CHALLENGE
     Maintaining the migrated model

     Use the EMF-generated tree editor

         already as good as, or better than, the Access application
     Derive an Xtext grammar from the metamodel
         Manual adjustments
         Have a DSL almost for free
         Familiar concepts: the metamodel (language) was not changed.
24




     www.ordina.nl

Contenu connexe

Tendances

5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven ArchitectureMajong DevJfu
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and EvolutionEelco Visser
 
MDA Architecture - UML modeling Presentation
MDA Architecture - UML modeling PresentationMDA Architecture - UML modeling Presentation
MDA Architecture - UML modeling Presentationanandonsite
 
German in 7 Million Shared Objects
German in 7 Million  Shared ObjectsGerman in 7 Million  Shared Objects
German in 7 Million Shared ObjectsESUG
 
Introduction to architectures based on models, models and metamodels. model d...
Introduction to architectures based on models, models and metamodels. model d...Introduction to architectures based on models, models and metamodels. model d...
Introduction to architectures based on models, models and metamodels. model d...Vicente García Díaz
 
GLSL Shading with OpenSceneGraph
GLSL Shading with OpenSceneGraphGLSL Shading with OpenSceneGraph
GLSL Shading with OpenSceneGraphMike Weiblen
 
Model-Driven Software Development
Model-Driven Software DevelopmentModel-Driven Software Development
Model-Driven Software Developmentelliando dias
 
Using Model Driven Development to Easily Manage Variations in Software Define...
Using Model Driven Development to Easily Manage Variations in Software Define...Using Model Driven Development to Easily Manage Variations in Software Define...
Using Model Driven Development to Easily Manage Variations in Software Define...ADLINK Technology IoT
 
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...Jordi Cabot
 
Extending Titanium with native iOS and Android modules
Extending Titanium with native iOS and Android modules Extending Titanium with native iOS and Android modules
Extending Titanium with native iOS and Android modules omorandi
 
M05 Metamodel
M05 MetamodelM05 Metamodel
M05 MetamodelDang Tuan
 
Titanium Mobile: flexibility vs. performance
Titanium Mobile: flexibility vs. performanceTitanium Mobile: flexibility vs. performance
Titanium Mobile: flexibility vs. performanceomorandi
 
MongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring DataMongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring DataChris Richardson
 
MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB for Java Devs with Spring Data - MongoPhilly 2011MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB for Java Devs with Spring Data - MongoPhilly 2011MongoDB
 
Visualize your architecture and information
Visualize your architecture and informationVisualize your architecture and information
Visualize your architecture and informationPeter Norrhall
 

Tendances (20)

Acceleo Code Generation
Acceleo Code GenerationAcceleo Code Generation
Acceleo Code Generation
 
5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
MDA Architecture - UML modeling Presentation
MDA Architecture - UML modeling PresentationMDA Architecture - UML modeling Presentation
MDA Architecture - UML modeling Presentation
 
German in 7 Million Shared Objects
German in 7 Million  Shared ObjectsGerman in 7 Million  Shared Objects
German in 7 Million Shared Objects
 
Introduction to architectures based on models, models and metamodels. model d...
Introduction to architectures based on models, models and metamodels. model d...Introduction to architectures based on models, models and metamodels. model d...
Introduction to architectures based on models, models and metamodels. model d...
 
GLSL Shading with OpenSceneGraph
GLSL Shading with OpenSceneGraphGLSL Shading with OpenSceneGraph
GLSL Shading with OpenSceneGraph
 
Model-Driven Software Development
Model-Driven Software DevelopmentModel-Driven Software Development
Model-Driven Software Development
 
Using Model Driven Development to Easily Manage Variations in Software Define...
Using Model Driven Development to Easily Manage Variations in Software Define...Using Model Driven Development to Easily Manage Variations in Software Define...
Using Model Driven Development to Easily Manage Variations in Software Define...
 
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...
MDE 2.0.: pragmatic model verification and other stories - Habilitation publi...
 
Mohamed el abacy
Mohamed el abacyMohamed el abacy
Mohamed el abacy
 
6
66
6
 
QVT & MTL In Eclipse
QVT & MTL In EclipseQVT & MTL In Eclipse
QVT & MTL In Eclipse
 
Extending Titanium with native iOS and Android modules
Extending Titanium with native iOS and Android modules Extending Titanium with native iOS and Android modules
Extending Titanium with native iOS and Android modules
 
M05 Metamodel
M05 MetamodelM05 Metamodel
M05 Metamodel
 
Titanium Mobile: flexibility vs. performance
Titanium Mobile: flexibility vs. performanceTitanium Mobile: flexibility vs. performance
Titanium Mobile: flexibility vs. performance
 
Understanding Mda
Understanding MdaUnderstanding Mda
Understanding Mda
 
MongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring DataMongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring Data
 
MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB for Java Devs with Spring Data - MongoPhilly 2011MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB for Java Devs with Spring Data - MongoPhilly 2011
 
Visualize your architecture and information
Visualize your architecture and informationVisualize your architecture and information
Visualize your architecture and information
 

Similaire à Transforming a 15 year old model-driven application from C++ to Java

Cg2012 niet-geanimeerd
Cg2012 niet-geanimeerdCg2012 niet-geanimeerd
Cg2012 niet-geanimeerdEric Malotaux
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIstvan Rath
 
Designing Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoDesigning Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoJoel Falcou
 
Close encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet CodeClose encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet Codelbergmans
 
Close Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codeClose Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codelbergmans
 
Soa symposium eclipse con 2013
Soa symposium   eclipse con 2013Soa symposium   eclipse con 2013
Soa symposium eclipse con 2013Marc Gille
 
FME's Role in a Map Revision Production Workflow and R&D Environment
FME's Role in a Map Revision Production Workflow and R&D EnvironmentFME's Role in a Map Revision Production Workflow and R&D Environment
FME's Role in a Map Revision Production Workflow and R&D EnvironmentSafe Software
 
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...AMD Developer Central
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWareMichael Vorburger
 
ModRef'09: Gecode support for MCP
ModRef'09: Gecode support for MCPModRef'09: Gecode support for MCP
ModRef'09: Gecode support for MCPpwuille
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
 
UML profiles for Embedded Systems
UML profiles for Embedded SystemsUML profiles for Embedded Systems
UML profiles for Embedded Systemspboulet
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingRuymán Reyes
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!melbats
 
Challenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksChallenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksIstvan Rath
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011devCAT Studio, NEXON
 
Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Marcel Bruch
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningCarol McDonald
 

Similaire à Transforming a 15 year old model-driven application from C++ to Java (20)

Cg2012 niet-geanimeerd
Cg2012 niet-geanimeerdCg2012 niet-geanimeerd
Cg2012 niet-geanimeerd
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation framework
 
Designing Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoDesigning Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.Proto
 
Close encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet CodeClose encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet Code
 
Close Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codeClose Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet code
 
Soa symposium eclipse con 2013
Soa symposium   eclipse con 2013Soa symposium   eclipse con 2013
Soa symposium eclipse con 2013
 
FME's Role in a Map Revision Production Workflow and R&D Environment
FME's Role in a Map Revision Production Workflow and R&D EnvironmentFME's Role in a Map Revision Production Workflow and R&D Environment
FME's Role in a Map Revision Production Workflow and R&D Environment
 
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWare
 
ModRef'09: Gecode support for MCP
ModRef'09: Gecode support for MCPModRef'09: Gecode support for MCP
ModRef'09: Gecode support for MCP
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
UML profiles for Embedded Systems
UML profiles for Embedded SystemsUML profiles for Embedded Systems
UML profiles for Embedded Systems
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
 
Challenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksChallenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworks
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011
 
Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011
 
Final Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee Applicaties
Final Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee ApplicatiesFinal Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee Applicaties
Final Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee Applicaties
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 

Dernier

March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechProduct School
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxNeo4j
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4DianaGray10
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 

Dernier (20)

March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 

Transforming a 15 year old model-driven application from C++ to Java

  • 1. 1 Transforming a 15 year old model-driven application from C++ to Java Eric Jan Malotaux Code Generation 2012, Cambridge, UK 2012-03-28
  • 3. 3 OVERVIEW Who I Am The Assignment Renovating applications The Strategy Lessons Learned Unsolved Problems
  • 4. 4 WHO AM I Eric Jan Malotaux Software Architect with Ordina, ICT service provider in the Netherlands Trained as a musician and musicologist 27 years experience in software development What I learned Automated procedures (software factory) as important as programming skills Communication and trust within a team even more important Specialties – anything that speeds up software development Software factories – automating as much as possible Agile development (extreme programming, Scrum) Model-driven code generation
  • 5. The Assignment Transforming a 15 year old model-driven application from C++ to Java
  • 6. 6 THE ASSIGNMENT THE APPLICATION A very succesful mortgage application 185 screens 100 users Quarterly releases Sizeable model: 200,000 lines (10Mb) of XMI Using a proprietary model-driven code generator Several interfaces to external systems: queues Several native Windows DLL's for complicated calculations
  • 8. 8 THE ASSIGNMENT THE MODELER/GENERATOR Old, but very complete Model in relational tables (DB2) Modeler written in MS-Access C++ Class Tree to keep model in memory Loader containing mapping (DB → Class Tree) knowledge Hand-written C++ framework, modeled Persistence support classes, including lazy loading User Interface support classes Action Language: COOL (Common Object Oriented Language) Methods on objects Actions on UI elements, like buttons Implicit metamodel (as far as known)
  • 9. 9 THE ASSIGNMENT WHY TRANSFORM? Dependent on outdated C++ compiler and libraries Scarce expertise Model-driven techniques in general The proprietary modeler/generator in particular C++ Modeler/generator maintained, but not further development Doesn't fit in Enterprise Architecture Difficult to offshore Want a mainstream Java web application And no code generator anymore please, thank you very much. No dependency on proprietary tools Current developers where quite happy, though
  • 11. Legacy application Renovated application Goals Goals Requirements update Requirements reverse engineering Specifications update Specifications reverse engineering Implementatio Automatic C++ to Java translation Implementatio n n
  • 13. Legacy application Renovated application Goals Requirements FAST FAST Mod4J FAST model C++ C++ C++ extractor model Xtend2 mogram model extractor extractor generator (database) (xmi) (textual DSL) (xmi) Xtend2 Xpand C++ generator C++ generator generator C++ Java implementatio implementatio n n
  • 15. Old Intermediate New (Enterprise Architect) SQL C++ UML Ecore M3 expressed in Abstract expressed in expressed in expressed in Syntax FAST FAST EA C++ FAST EA ecore M2 metamodel “Class Tree” import metamodel export Expo metamodel (relational) rt (ecore) gene ra to r expressed in expressed in expressed in (xten d FMA 2) gen FMA FMA e FMA Model FMA expor M1 model gen load e object t r model (database) graph a (xmi) r (C++) t a o t r o s r (xte s n (C+ d + 2 FMA FMA M0 user data ) ) application
  • 16. Ext r a Enterpri se c Legenda t Architect o given r FAST gen FAST manual FAST e EMF “Class metamo tools metamo r generato Tree del del a r ” (ecore) generated t o r FMA (xte n FMA FAST model Load/ d model model FM (databas extract 2 (XMI) Java API A e) ) gen e r a FAST t FMA editor o model r (xte n d JNA FMA 2 FMA ) adapters example (Java) (Java) (Java) FAST FAST maven/ framewo framewo javac/ rk rk build (C++) (Java) External External (MQ) (MQ) FMA clas clas (JWS/jar FMA ses ses ) data (C++) (Java)
  • 18. 18 LESSONS LEARNED The value of an explicit metamodel Help in understanding the model Generated export program Generated tree editor Generated model API Basis for a new DSL
  • 19. 19 LESSONS LEARNED Generator architecture Consistent naming Use an intermediate model
  • 20. 20 LESSONS LEARNED Incompatible source/target architecture Layering: classic client → server, modern three-tiered Lazy loading assumed in the COOL Action Language One Action Language for UI and Class Methods
  • 21. 21 LESSONS LEARNED Know your tools Know your tools EMF is a great tool, once you obtain a copy of the EMF book Xtext2, needed for COOL Parser, difficult to integrate Xtend2, nice but still buggy
  • 22. 22 REMAINING UNSOLVED PROBLEMS Eclipse is a hard to tame beast! Working combination of (versions of) plugins Hard to get rid of red crosses Continuous integration Maven ↔ OSGi: two worlds Eclipse artifacts (not) in public maven repositories
  • 23. 23 REMAINING CHALLENGE Maintaining the migrated model Use the EMF-generated tree editor already as good as, or better than, the Access application Derive an Xtext grammar from the metamodel Manual adjustments Have a DSL almost for free Familiar concepts: the metamodel (language) was not changed.
  • 24. 24 www.ordina.nl

Notes de l'éditeur

  1. This presentation is tcase study about “Transforming a 15 year old model-driven application from C++ to Java”
  2. Let me first give an overview of my presentation.
  3. First I will introduce myself. Then I will describe the assignment that this presentation is about Since the assignment was essentially a renovation of an existing application, I will describe how renovation of old applications is done in general. Next I will describe how we applied different strategies in succession as we learned on the job. Finally I will try to draw some lessons from the experience and mention a number of problems that we did not yet find a good solution for.
  4. What I learned in those 27 years: - Automated procedures as important as programming skills or architecture - Automated build - Version management - Automated deployment - (Automatic unit testing) - Communication and trust within team Specialties: - Software factories 25+ years - used to be new but now more common - Model-driven code generation 10+ years - Agile Development - eXtreme Programming 10+ years - Scrum 3+ years
  5. What was our assignment?
  6. A very succesful mortgage application - 185 screens (or parts of screens) - 100 users - regular quarterly releases - sizeable model: 200.000 lines, 10Mb of XMI Using a proprietary model-driven C++ generator written in C++ Several interfaces to external systems, queues Several native Windows DLL's for complicated calculations
  7. Implicit metamodel (as far as known) Model in relational tables (DB2) C++ “Class Tree” to load model in memory - analogous to the EMF generated Java API Loader containing the mapping knowledge Hand-written C++ framework - persistence support classes, including lazy loading - user interface support classes Action Language: COOL (Common Object Oriented Language), used everywhere: - methods of objects - actions on UI elements (buttons, fields)
  8. Scarce expertise - model-driven techniques in general - this particular modeler/generator in particular - C++ Dependent on outdated C++ compiler and libraries Modeler/generator maintained but not further developed: dead end Difficult to offshore Wanted: a regular Java webapplication No code generator - dependency on proprietary tool - Current developers where quite happy with the tool and productive
  9. Start to establish goals for a new application Collect requirements Make specification Implement However: in many cases there is only source code, and if there is more documentation, it is often outdated. How to renovate: - automatic source translation? No idiomatic Java. - Better: reverse engineer specifications and re-implement - Even better (but more difficult): reverse engineer reqs. - End to Goals.
  10. But in our case we had specification in the form of an executable (therefore correct) model. 1) Write a new C++ generator to generate Java - Problem: large conceptual gap to bridge: - C++ to Java (fluency in both needed) - Different architecture - On top of model driven skills 2) Use Mod4J as intermediate model - Smaller conceptual gap - Built-in Java architecture - Based on written reference architecture 3) Migrate model to EMF for productivity - Better tools - Better software factory 4) Mod4J incompatibly architecture - fat client ↔ layering - COOL language everywhere - lazy loading
  11. Want to use EMF - Need an ecore metamodel - Derive from “Class Tree” - Via Enterprise Architect im/export - Generate an export program - Generate our new application - Loading time: 1,5 second - But initially 25 seconds (!) - Need a HashMap for id's
  12. An intermediate model provides a natural place for names
  13. Classic client server → modern three tiered layered Lazy loading assumed in de Action Language One Scope with UI scripts and Class Methods
  14. Know your tools - EMF is great, but you need the book - Xtext2 for the COOL Parser difficult to integrate - Xtend2, nice but buggy and slow
  15. Eclipse is difficult - Working combination of (versions of) plugins - Hard to get rid of the red crosses Continuous integration - Maven ↔ OSGi: two worlds - Solve a similar problem - Different audiences: tool/application builders - But MDCD overlap the two - Eclipse artifacts not automatically in maven repositories.
  16. How to maintain the migrated model: - Use EMF tree editor - already quite good - Derive an Xtext grammar from the metamodel - beautify - DSL for “free” - The language is still the same - Familiar for the maintainers