SlideShare a Scribd company logo
1 of 24
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
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

More Related Content

What's hot

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
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

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
  • 7.
  • 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

Editor's Notes

  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