SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
Modelling and Code Generation
on the .NET Platform
       @
           Rubén Jiménez          rjimenez@icinetic.com
                                  @rubenjmarrufo

           Pedro J. Molina, PhD   pjmolina@icinetic.com
                                  @pmolinam
Contents
   Introduction
   History of Microsoft Modeling
   MDSD: Approaches
   MDSD: Reference Framework
   MDSD: Tour of features
   Demos



                       © Icinetic 2012   2
Introduction



 We do MDSD Tools for developers
 Focused on .NET technologies &
  Architecture Services
 HQ in Seville, Spain


                      © Icinetic 2012   3
History of Microsoft Modeling
      2005: First release of MS DSL Tools

      2007: First details about its plans for the “Oslo” project

      2008: First Microsoft “Oslo” CTP

      2009: Visual Studio 2010 V&M SDK Beta

      2010: Microsoft “Oslo” is obliterated

      2010: Visual Studio LightSwitch

      2011: Visual Studio 11 V&M SDK Beta

                  © Icinetic 2012                           4
.NET & MDSD
  Ready to dive?




    © Icinetic 2012   5
MDSD: Choose your path
                                 MDA/UML:
                                  Metamodel is highly closed
      MDSD                        Symbol and concept overloading
                                  Not clear Semantics
                                  Action Language
MDA          DSLs                 Domains not cover by UML
                                  Abuse of profiles
                                  Tools: many dialects of XMI


                                 DSLs:
                                  Cost of DSLs and tools required
                                 to develop with it.



               © Icinetic 2012                                 6
MDSD Reference FWK
                        Metamodel(s)

Textual Model Editor
                                                        Reverse
                                                      Engineering
Visual Model Editor
                               Model(s)
  Model Checker
                                                        Model
                                                      repository
        IDE

                       Model Transformation

                       M2M                 M2T


                                           Code
                       Model
                                          Doc, etc.

                        © Icinetic 2012                        7
Metamodeling
 The analysis, construction and development of the frames, rules,
  constraints, models and theories applicable and useful for
  modeling a predefined class of problems (Wikipedia)
                                                         Source
 Based in CARs
                                               Class             Relation
    Classes / Entities / Objects
                                                Properties         Cardinality
    Attributes / Properties
    Relationships
                                                          Target


 At Icinetic:
                                  Customer                        Credit Card
    MS DSL Tools
                                              1               *
    Essential Meta

                                 © Icinetic 2012                                 8
                                                                                     8
Metamodeling: MS DSL Tools
 Visual Studio Visualization & Modeling SDK.
 Features:
       Graphical meta-modeling.
       Build graphical designers.
       M2T: T4.
       Model validations.
       IDE: Visual Studio.

 Benefits:
     Agile
     Visual

 Drawbacks:
     Generated designers performance:
          “Magnify diagrams and multiply it”: Pascal Recchia.


                                        © Icinetic 2012          9
Metamodeling: Essential
namespace Meta
{
    class MailMessage
    {
         Person From;
         List<Person> To;

         string Subject;
         string Message;
    }

    class Person
    {
        string FullName;
        string Email;
    }
}


                            © Icinetic 2012   10
Metamodeling: Essential META
Essential META                2009     XCore                           2012
namespace org.example.library           package org.example.library
{
  class Book                            class Book
  {                                     {
     string title;
                                            String title
     int pages;
                                            int pages
     List<Writer> authors opposite
books;                                      refers Writer[] authors opposite
  }                                     books
                                        }
    enum BookCategory
    {                                   enum BookCategory
        Mistery,                        {
        ScienceFiction,                     Mistery
        Biography                           ScienceFiction
    }                                       Biography
}
                                        }

                                     © Icinetic 2012                          11
MDSD: Models
                           Metamodel(s)

Textual Model Editor
                                                             Reverse
Visual Model Editor                                        Engineering
                                  Model(s)
  Model Checker
                                                             Model
        IDE                                                repository


                          Model Transformation

                          M2M                       M2T


                                                Code
                          Model
                                               Doc, etc.

                                  © Icinetic 2012                  12
Models: some Cases of Use
1. Validation   2. Interpretation              3. Code Generation

  Model             Model                           Model




  Model                                            Code
                 Interpreter
 Checker                                         Generation

                    Runtime                                          Code
                 interpretation
                                                                    Metadata

                                                  Generated            Doc
  Report
                                                    Code               Config.
                                                                        Tests
                                                                            ...
                             © Icinetic 2012                                      13
Models: Code generation techniques
1. Parse model                                       Input Model



2. In-memory representation
                                                          Template
   AST / Object Model                     AST



3. Output building
   Free text concatenation
   XSL-T (No thanks!)
   Text Template based
                                                 Output code

                         © Icinetic 2012                       14
Models: Parsers
Parsers       License   Url          Grammar Parsing    IDE Strengths
                                     notation algorithm

ANTLR         BSD       www.antlr    EBNF           LL     Yes   Mature & widely
                        .org/
                                                                 used
Irony.Net     MIT       irony.code   BNF            LALR   Yes   Interpreted
                        plex.com/


Gold parser   FW        goldparse    BNF            LALR   No    Supported
                        r.org/
                                                                 languages: more
                                                                 than any other
                                                                 parsing system
Grammatica    GNU       grammati     EBNF           LL     No    Readable generated
                        ca.percede
                        rberg.net/                               parse code


                                      © Icinetic 2012                                 15
MDSD: Editors
                           Metamodel(s)

Textual Model Editor
                                                             Reverse
Visual Model Editor                                        Engineering
                                  Model(s)
  Model Checker                                              Model
                                                           repository
        IDE

                          Model Transformation

                          M2M                       M2T


                                                Code
                          Model
                                               Doc, etc.

                                  © Icinetic 2012                  16
Textual Model Editors
 DDD Textual DSL            Essential Text Editor




                    © Icinetic 2012                   17
Graphical Model Editors
 MS DSL Tools
    WinForms
    WPF


 Custom:
    WinForms
    WPF


 Third party
  tools: Visio,
  EA, etc.

                    © Icinetic 2012   18
Graphical Model Editors
 MS DSL Tools
    WinForms
    WPF


 Custom:
    WinForms
    WPF


 Third party
  tools: Visio,
  EA, etc.

                    © Icinetic 2012   19
Graphical Model Editors
 MS DSL Tools
    WinForms
    WPF


 Custom:
    WinForms
    WPF


 Third party
  tools: Visio,
  EA, etc.

                    © Icinetic 2012   20
Graphical Model Editors
 MS DSL Tools
    WinForms
    WPF


 Custom:
    WinForms
    WPF


 Third party
  tools: Visio,
  EA, etc.

                    © Icinetic 2012   21
Other Model Editors
 Tables




 Trees




           © Icinetic 2012   22
MDSD: Reverse engineering
                        Metamodel(s)

Textual Model Editor
                                                          Reverse
Visual Model Editor                                     Engineering
                               Model(s)
  Model Checker                                           Model
                                                        repository
        IDE

                       Model Transformation

                       M2M                       M2T


                                             Code
                       Model
                                            Doc, etc.

                               © Icinetic 2012                  23
Reverse Engineering
 External assets to model
 Sources:
   Databases
      EDMX Database importer
   Services
      Custom parsers
   Legacy code
      Custom parsers


                        © Icinetic 2012   24
MDSD: Model Checkers
                        Metamodel(s)

Textual Model Editor
                                                          Reverse
Visual Model Editor                                     Engineering
                               Model(s)
  Model Checker
                                                          Model
                                                        repository
        IDE

                       Model Transformation

                       M2M                       M2T


                                             Code
                       Model
                                            Doc, etc.

                               © Icinetic 2012                  25
Model Checkers: Validation Engine

 MS DSL Tools
   AOP
   IDE integration
   Hollywood
    Principle




                      © Icinetic 2012   26
Models Checkers: Validation Engine
 Essential
      AST + Visitor
      Two phase checking
      Syntax check
      Model Merge
      Reference resolver
      Semantic check
      Validation FWK
         Extensible



                            © Icinetic 2012   27
MDSD: Model Repositories
                        Metamodel(s)

Textual Model Editor
                                                          Reverse
Visual Model Editor                                     Engineering
                               Model(s)
  Model Checker
                                                          Model
                                                        repository
        IDE

                       Model Transformation

                       M2M                       M2T


                                             Code
                       Model
                                            Doc, etc.

                               © Icinetic 2012                  28
Model Repositories
 XML serialization to file

 Text serialization to file

 Relational DBMS

 Documental DB / NoSQL




                               © Icinetic 2012   29
Model Repositories
 XML serialization to file

 Text serialization to file

 Relational DBMS

 Documental DB / NoSQL




                               © Icinetic 2012   30
Model Repositories
 XML serialization to file

 Text serialization to file

 Relational DBMS

 Documental DB / NoSQL




                               © Icinetic 2012   31
Model Repositories
 XML serialization to file

 Text serialization to file

 Relational DBMS

 Documental DB / NoSQL




                               © Icinetic 2012   32
MDSD: Transformations
                        Metamodel(s)

Textual Model Editor
                                                          Reverse
Visual Model Editor                                     Engineering
                               Model(s)
  Model Checker                                           Model
                                                        repository
        IDE

                       Model Transformation

                       M2M                       M2T


                                             Code
                       Model
                                            Doc, etc.

                               © Icinetic 2012                  33
Transformations
 M2T
   Free text concatenation
   XSL-T (No thanks!)
   Text Template based
      T4
      StringTemplate
 M2M
   Imperative
   Declarative

                        © Icinetic 2012   34
MDSD: M2T
                          Metamodel(s)

Textual Model Editor
                                                            Reverse
Visual Model Editor                                       Engineering
                                 Model(s)
  Model Checker                                             Model
                                                          repository
        IDE

                         Model Transformation

                         M2M                       M2T


                                               Code
                         Model
                                              Doc, etc.

                                 © Icinetic 2012                  35
M2T: T4 Templates
 Text Template Transformation Toolkit
 Released in 2005 by Microsoft
 Syntax:
    Directives
    Text blocks
    Control blocks
 Usages:
    Standard
    Precompiled: webResponseText=template.TransformText();

                           © Icinetic 2012.                   36
M2T: StringTemplate
 Terrence Parr’s templates                group Templates;

 Dynamic templates                        genMail(msg) ::= <<
                                           From: $msg.From:genRecipient()$
 Strong separation of                     To:   $msg.To:genRecipient();
                                           separator=", "$
  concerns: Model, View
  and Control                              Subject: $msg.Subject$
                                           MESSAGE:
                                           ------------------------------
                                           $msg.Message$
 Good maintanability                      ------------------------------
                                           >>

                                           genRecipient()::= <<
                                           $it.FullName$ <$it.Email$>
                                           >>


                        © Icinetic 2012.                                37
M2T: Template Engines
                          Time to generate 5000 files of 5 Kb of average
                   40

                   35
 T4               30


 StringTemplate
                   25
                                                                            Write File
                   20
                                                                            Generation
 Precompiled T4   15
                                                                            Load/compile
                   10

                    5

                    0
                                T4          StringTemplate T4 Precompiled

                           T4               StringTemplate       Precompiled T4
 Total time (ms)         392.935                 56.483              48.894
 Time(ms)/file           78,587                   11,297              9,779
 Time(ms)/MB            4.066,142               876,654              505,961
 Improvement/T4            base                       x7                 x8

                          © Icinetic 2012                                         38
MDSD: M2M
                          Metamodel(s)

Textual Model Editor
                                                            Reverse
Visual Model Editor                                       Engineering
                                 Model(s)
  Model Checker                                             Model
                                                          repository
        IDE

                         Model Transformation

                         M2M                       M2T


                                               Code
                         Model
                                              Doc, etc.

                                 © Icinetic 2012                  39
M2M: Imperative




     © Icinetic 2012   40
M2M: Imperative




     © Icinetic 2012   41
M2M: Declarative
 Essential TRX
   Rule-based language
   Interpreted




                      © Icinetic 2012   42
MDSD: IDE Integration
                        Metamodel(s)

Textual Model Editor
                                                          Reverse
Visual Model Editor                                     Engineering
                               Model(s)
  Model Checker                                           Model
                                                        repository
        IDE

                       Model Transformation

                       M2M                       M2T


                                             Code
                       Model
                                            Doc, etc.

                               © Icinetic 2012                  43
IDE Integration

1. Model Editors
                                                   VS packages
                            Folders & Projects


2. Model checkers
                           Generated & custom    Errors validation
                            code coexistence


3. Model to Text
                                                 Generated assets
                                                    tracking



                    © Icinetic 2012                                  44
Making sense of it all
 Radarc
   Plug-in on the top of Visual Studio
   Modelling environment and code generation
    packetized by architectures




                      © Icinetic 2012           45
Radarc Formulas
 A Formula is a code                          Formulas available
  generator including:
                                                    ASP.NET WebForms
      Models / DSLs                                ASP.NET MVC
      Editors                                      MVC + Azure
      Traceability rules                           Windows Phone 7
      Best practices                               DDD N-Layered
      Templates

                                                  … and growing

                            © Icinetic 2012                             46
Demo




© Icinetic 2012   47
Conclusions
 Modelling and code generation
  technologies have matured a lot
  in the latest years
 The .NET platform has a strong
  base of tools to make MDSD
  approaches feasible.
 MDSD is not more a luxury, is a
  precision tool. Take profit!

                     © Icinetic 2012   48
Questions &        (might be)   Anwers




        © Icinetic 2012                  49
www.radarc.net
    @RadarcNet


pjmolina.com/essential
                         50

Contenu connexe

Tendances

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
 
A UML profile for OData Web APIs
A UML profile for OData Web APIsA UML profile for OData Web APIs
A UML profile for OData Web APIsJordi Cabot
 
Lightweight Model-Driven Engineering
Lightweight Model-Driven EngineeringLightweight Model-Driven Engineering
Lightweight Model-Driven EngineeringJordi Cabot
 
Web technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringWeb technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringPiero Fraternali
 
Model driven software engineering in practice book - chapter 7 - Developing y...
Model driven software engineering in practice book - chapter 7 - Developing y...Model driven software engineering in practice book - chapter 7 - Developing y...
Model driven software engineering in practice book - chapter 7 - Developing y...Marco Brambilla
 
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionModel-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionMarco Brambilla
 

Tendances (7)

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...
 
A UML profile for OData Web APIs
A UML profile for OData Web APIsA UML profile for OData Web APIs
A UML profile for OData Web APIs
 
Lightweight Model-Driven Engineering
Lightweight Model-Driven EngineeringLightweight Model-Driven Engineering
Lightweight Model-Driven Engineering
 
Web technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringWeb technologies: Model Driven Engineering
Web technologies: Model Driven Engineering
 
Understanding Mda
Understanding MdaUnderstanding Mda
Understanding Mda
 
Model driven software engineering in practice book - chapter 7 - Developing y...
Model driven software engineering in practice book - chapter 7 - Developing y...Model driven software engineering in practice book - chapter 7 - Developing y...
Model driven software engineering in practice book - chapter 7 - Developing y...
 
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionModel-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
 

En vedette

Introducción a StackOverflow
Introducción a StackOverflowIntroducción a StackOverflow
Introducción a StackOverflowPedro J. Molina
 
Modeling and Code Generation in the Cloud for Citizen Developers and Beyond
Modeling and Code Generation in the Cloud for Citizen Developers and BeyondModeling and Code Generation in the Cloud for Citizen Developers and Beyond
Modeling and Code Generation in the Cloud for Citizen Developers and BeyondPedro J. Molina
 
Scaling MDD for production: enabling SoC at model time
Scaling MDD for production: enabling SoC at model timeScaling MDD for production: enabling SoC at model time
Scaling MDD for production: enabling SoC at model timePedro J. Molina
 
Hivepod: Casos de uso en OpenData
Hivepod: Casos de uso en OpenDataHivepod: Casos de uso en OpenData
Hivepod: Casos de uso en OpenDataPedro J. Molina
 
MDD: Models, frameworks, & code generation
MDD: Models, frameworks, & code generationMDD: Models, frameworks, & code generation
MDD: Models, frameworks, & code generationPedro J. Molina
 
SVQDC 2017 Tecnologías para Microservicios
SVQDC 2017 Tecnologías para MicroserviciosSVQDC 2017 Tecnologías para Microservicios
SVQDC 2017 Tecnologías para MicroserviciosPedro J. Molina
 
Microservicios sobre MEAN Stack
Microservicios sobre MEAN StackMicroservicios sobre MEAN Stack
Microservicios sobre MEAN StackPedro J. Molina
 
Tecnologías para microservicios
Tecnologías para microserviciosTecnologías para microservicios
Tecnologías para microserviciosPedro J. Molina
 
Modelling the User Interface
Modelling the User InterfaceModelling the User Interface
Modelling the User InterfacePedro J. Molina
 
Code Generation for Conceptual User Interface Patterns
Code Generation for Conceptual User Interface PatternsCode Generation for Conceptual User Interface Patterns
Code Generation for Conceptual User Interface PatternsPedro J. Molina
 
The PISA Project: a MDD case study
The PISA Project: a MDD case studyThe PISA Project: a MDD case study
The PISA Project: a MDD case studyPedro J. Molina
 
Opensouthcode: Microservicios sobre MEAN Stack
Opensouthcode: Microservicios sobre MEAN StackOpensouthcode: Microservicios sobre MEAN Stack
Opensouthcode: Microservicios sobre MEAN StackPedro J. Molina
 
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)Jordi Cabot
 

En vedette (16)

Introducción a StackOverflow
Introducción a StackOverflowIntroducción a StackOverflow
Introducción a StackOverflow
 
TDD+CI con Teamcity
TDD+CI con TeamcityTDD+CI con Teamcity
TDD+CI con Teamcity
 
Modeling and Code Generation in the Cloud for Citizen Developers and Beyond
Modeling and Code Generation in the Cloud for Citizen Developers and BeyondModeling and Code Generation in the Cloud for Citizen Developers and Beyond
Modeling and Code Generation in the Cloud for Citizen Developers and Beyond
 
Scaling MDD for production: enabling SoC at model time
Scaling MDD for production: enabling SoC at model timeScaling MDD for production: enabling SoC at model time
Scaling MDD for production: enabling SoC at model time
 
Hivepod: Casos de uso en OpenData
Hivepod: Casos de uso en OpenDataHivepod: Casos de uso en OpenData
Hivepod: Casos de uso en OpenData
 
MDD: Models, frameworks, & code generation
MDD: Models, frameworks, & code generationMDD: Models, frameworks, & code generation
MDD: Models, frameworks, & code generation
 
SVQDC 2017 Tecnologías para Microservicios
SVQDC 2017 Tecnologías para MicroserviciosSVQDC 2017 Tecnologías para Microservicios
SVQDC 2017 Tecnologías para Microservicios
 
Microservicios sobre MEAN Stack
Microservicios sobre MEAN StackMicroservicios sobre MEAN Stack
Microservicios sobre MEAN Stack
 
Modeling on the Web
Modeling on the WebModeling on the Web
Modeling on the Web
 
Tecnologías para microservicios
Tecnologías para microserviciosTecnologías para microservicios
Tecnologías para microservicios
 
Modelling the User Interface
Modelling the User InterfaceModelling the User Interface
Modelling the User Interface
 
Code Generation for Conceptual User Interface Patterns
Code Generation for Conceptual User Interface PatternsCode Generation for Conceptual User Interface Patterns
Code Generation for Conceptual User Interface Patterns
 
The PISA Project: a MDD case study
The PISA Project: a MDD case studyThe PISA Project: a MDD case study
The PISA Project: a MDD case study
 
Opensouthcode: Microservicios sobre MEAN Stack
Opensouthcode: Microservicios sobre MEAN StackOpensouthcode: Microservicios sobre MEAN Stack
Opensouthcode: Microservicios sobre MEAN Stack
 
Introducción a Angular
Introducción a AngularIntroducción a Angular
Introducción a Angular
 
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
 

Similaire à Modelling and code generation in .NET at Icinetic

MoDisco Eclipse-OMG Symp 2010
MoDisco Eclipse-OMG Symp 2010MoDisco Eclipse-OMG Symp 2010
MoDisco Eclipse-OMG Symp 2010fmadiot
 
Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Futureelliando dias
 
Software Architecture by Reuse, Composition and Customization
Software Architecture by Reuse, Composition and Customization  Software Architecture by Reuse, Composition and Customization
Software Architecture by Reuse, Composition and Customization Ivano Malavolta
 
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. MolinaACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. MolinaPedro J. Molina
 
Analyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotAnalyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotEclipseDayParis
 
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012Marc Dutoo
 
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...Marco Brambilla
 
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
 
Visualize your architecture and information
Visualize your architecture and informationVisualize your architecture and information
Visualize your architecture and informationPeter Norrhall
 
MDD and modeling tools research
MDD and modeling tools researchMDD and modeling tools research
MDD and modeling tools researchRoger Xia
 
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Hugo Bruneliere
 
OpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite LabOpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite LabOpenTravel Alliance
 
OpenTravel Model-Driven Schema at IATA
OpenTravel Model-Driven Schema at IATAOpenTravel Model-Driven Schema at IATA
OpenTravel Model-Driven Schema at IATAOpenTravel Alliance
 
UML 2.5: Specification Simplification
UML 2.5: Specification SimplificationUML 2.5: Specification Simplification
UML 2.5: Specification SimplificationEd Seidewitz
 
Document Classification using DMX in SQL Server Analysis Services
Document Classification using DMX in SQL Server Analysis ServicesDocument Classification using DMX in SQL Server Analysis Services
Document Classification using DMX in SQL Server Analysis ServicesMark Tabladillo
 
Spy On Your Models, Standard talk at EclipseCon 2011
Spy On Your Models, Standard talk at EclipseCon 2011Spy On Your Models, Standard talk at EclipseCon 2011
Spy On Your Models, Standard talk at EclipseCon 2011Hugo Bruneliere
 
From Requirements Management to Release with Git for Android System
From Requirements Management to Release with Git for Android System From Requirements Management to Release with Git for Android System
From Requirements Management to Release with Git for Android System Intland Software GmbH
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesMarco Brambilla
 

Similaire à Modelling and code generation in .NET at Icinetic (20)

MoDisco Eclipse-OMG Symp 2010
MoDisco Eclipse-OMG Symp 2010MoDisco Eclipse-OMG Symp 2010
MoDisco Eclipse-OMG Symp 2010
 
Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Future
 
Software Architecture by Reuse, Composition and Customization
Software Architecture by Reuse, Composition and Customization  Software Architecture by Reuse, Composition and Customization
Software Architecture by Reuse, Composition and Customization
 
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. MolinaACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
 
Sig A&D - MDA
Sig A&D - MDASig A&D - MDA
Sig A&D - MDA
 
Analyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotAnalyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric Madiot
 
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
 
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...
 
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...
 
Visualize your architecture and information
Visualize your architecture and informationVisualize your architecture and information
Visualize your architecture and information
 
Cg 2011
Cg 2011Cg 2011
Cg 2011
 
MDD and modeling tools research
MDD and modeling tools researchMDD and modeling tools research
MDD and modeling tools research
 
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
 
OpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite LabOpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite Lab
 
OpenTravel Model-Driven Schema at IATA
OpenTravel Model-Driven Schema at IATAOpenTravel Model-Driven Schema at IATA
OpenTravel Model-Driven Schema at IATA
 
UML 2.5: Specification Simplification
UML 2.5: Specification SimplificationUML 2.5: Specification Simplification
UML 2.5: Specification Simplification
 
Document Classification using DMX in SQL Server Analysis Services
Document Classification using DMX in SQL Server Analysis ServicesDocument Classification using DMX in SQL Server Analysis Services
Document Classification using DMX in SQL Server Analysis Services
 
Spy On Your Models, Standard talk at EclipseCon 2011
Spy On Your Models, Standard talk at EclipseCon 2011Spy On Your Models, Standard talk at EclipseCon 2011
Spy On Your Models, Standard talk at EclipseCon 2011
 
From Requirements Management to Release with Git for Android System
From Requirements Management to Release with Git for Android System From Requirements Management to Release with Git for Android System
From Requirements Management to Release with Git for Android System
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
 

Plus de Pedro J. Molina

dotnetMalaga-2020 Gestión de la configuración en aplicaciones Web
dotnetMalaga-2020 Gestión de la configuración en aplicaciones WebdotnetMalaga-2020 Gestión de la configuración en aplicaciones Web
dotnetMalaga-2020 Gestión de la configuración en aplicaciones WebPedro J. Molina
 
Infrastructure as Code with Terraform
Infrastructure as Code with TerraformInfrastructure as Code with Terraform
Infrastructure as Code with TerraformPedro J. Molina
 
Essential as the base for Web DSLs
Essential as the base for Web DSLsEssential as the base for Web DSLs
Essential as the base for Web DSLsPedro J. Molina
 
Esencia de Web Components
Esencia de Web ComponentsEsencia de Web Components
Esencia de Web ComponentsPedro J. Molina
 
Esencia de web components
Esencia de web componentsEsencia de web components
Esencia de web componentsPedro J. Molina
 
Securizando por construcción mediante MDE
Securizando por construcción mediante MDESecurizando por construcción mediante MDE
Securizando por construcción mediante MDEPedro J. Molina
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi SpecPedro J. Molina
 
Micro vs Nano (servicios)
Micro vs Nano (servicios)Micro vs Nano (servicios)
Micro vs Nano (servicios)Pedro J. Molina
 
Diseño de APIs con OpenAPI
Diseño de APIs con OpenAPIDiseño de APIs con OpenAPI
Diseño de APIs con OpenAPIPedro J. Molina
 

Plus de Pedro J. Molina (15)

MDE en la industria
MDE en la industriaMDE en la industria
MDE en la industria
 
Terraform
TerraformTerraform
Terraform
 
dotnetMalaga-2020 Gestión de la configuración en aplicaciones Web
dotnetMalaga-2020 Gestión de la configuración en aplicaciones WebdotnetMalaga-2020 Gestión de la configuración en aplicaciones Web
dotnetMalaga-2020 Gestión de la configuración en aplicaciones Web
 
Infrastructure as Code with Terraform
Infrastructure as Code with TerraformInfrastructure as Code with Terraform
Infrastructure as Code with Terraform
 
Are Startups for me?
Are Startups for me?Are Startups for me?
Are Startups for me?
 
Meow Demo
Meow DemoMeow Demo
Meow Demo
 
Essential as the base for Web DSLs
Essential as the base for Web DSLsEssential as the base for Web DSLs
Essential as the base for Web DSLs
 
Esencia de Web Components
Esencia de Web ComponentsEsencia de Web Components
Esencia de Web Components
 
Esencia de web components
Esencia de web componentsEsencia de web components
Esencia de web components
 
OpenAPI 3.0.2
OpenAPI 3.0.2OpenAPI 3.0.2
OpenAPI 3.0.2
 
Quid
QuidQuid
Quid
 
Securizando por construcción mediante MDE
Securizando por construcción mediante MDESecurizando por construcción mediante MDE
Securizando por construcción mediante MDE
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi Spec
 
Micro vs Nano (servicios)
Micro vs Nano (servicios)Micro vs Nano (servicios)
Micro vs Nano (servicios)
 
Diseño de APIs con OpenAPI
Diseño de APIs con OpenAPIDiseño de APIs con OpenAPI
Diseño de APIs con OpenAPI
 

Dernier

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
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
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
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 
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
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
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
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
 
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
 
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
 
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
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 

Dernier (20)

Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
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
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
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
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
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...
 
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
 
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
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 

Modelling and code generation in .NET at Icinetic

  • 1. Modelling and Code Generation on the .NET Platform @ Rubén Jiménez rjimenez@icinetic.com @rubenjmarrufo Pedro J. Molina, PhD pjmolina@icinetic.com @pmolinam
  • 2. Contents  Introduction  History of Microsoft Modeling  MDSD: Approaches  MDSD: Reference Framework  MDSD: Tour of features  Demos © Icinetic 2012 2
  • 3. Introduction  We do MDSD Tools for developers  Focused on .NET technologies & Architecture Services  HQ in Seville, Spain © Icinetic 2012 3
  • 4. History of Microsoft Modeling 2005: First release of MS DSL Tools 2007: First details about its plans for the “Oslo” project 2008: First Microsoft “Oslo” CTP 2009: Visual Studio 2010 V&M SDK Beta 2010: Microsoft “Oslo” is obliterated 2010: Visual Studio LightSwitch 2011: Visual Studio 11 V&M SDK Beta © Icinetic 2012 4
  • 5. .NET & MDSD Ready to dive? © Icinetic 2012 5
  • 6. MDSD: Choose your path MDA/UML:  Metamodel is highly closed MDSD  Symbol and concept overloading  Not clear Semantics  Action Language MDA DSLs  Domains not cover by UML  Abuse of profiles  Tools: many dialects of XMI DSLs:  Cost of DSLs and tools required to develop with it. © Icinetic 2012 6
  • 7. MDSD Reference FWK Metamodel(s) Textual Model Editor Reverse Engineering Visual Model Editor Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 7
  • 8. Metamodeling  The analysis, construction and development of the frames, rules, constraints, models and theories applicable and useful for modeling a predefined class of problems (Wikipedia) Source  Based in CARs Class Relation  Classes / Entities / Objects Properties Cardinality  Attributes / Properties  Relationships Target  At Icinetic: Customer Credit Card  MS DSL Tools 1 *  Essential Meta © Icinetic 2012 8 8
  • 9. Metamodeling: MS DSL Tools  Visual Studio Visualization & Modeling SDK.  Features:  Graphical meta-modeling.  Build graphical designers.  M2T: T4.  Model validations.  IDE: Visual Studio.  Benefits:  Agile  Visual  Drawbacks:  Generated designers performance:  “Magnify diagrams and multiply it”: Pascal Recchia. © Icinetic 2012 9
  • 10. Metamodeling: Essential namespace Meta { class MailMessage { Person From; List<Person> To; string Subject; string Message; } class Person { string FullName; string Email; } } © Icinetic 2012 10
  • 11. Metamodeling: Essential META Essential META 2009 XCore 2012 namespace org.example.library package org.example.library { class Book class Book { { string title; String title int pages; int pages List<Writer> authors opposite books; refers Writer[] authors opposite } books } enum BookCategory { enum BookCategory Mistery, { ScienceFiction, Mistery Biography ScienceFiction } Biography } } © Icinetic 2012 11
  • 12. MDSD: Models Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model IDE repository Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 12
  • 13. Models: some Cases of Use 1. Validation 2. Interpretation 3. Code Generation Model Model Model Model Code Interpreter Checker Generation Runtime Code interpretation Metadata Generated Doc Report Code Config. Tests ... © Icinetic 2012 13
  • 14. Models: Code generation techniques 1. Parse model Input Model 2. In-memory representation Template  AST / Object Model AST 3. Output building  Free text concatenation  XSL-T (No thanks!)  Text Template based Output code © Icinetic 2012 14
  • 15. Models: Parsers Parsers License Url Grammar Parsing IDE Strengths notation algorithm ANTLR BSD www.antlr EBNF LL Yes Mature & widely .org/ used Irony.Net MIT irony.code BNF LALR Yes Interpreted plex.com/ Gold parser FW goldparse BNF LALR No Supported r.org/ languages: more than any other parsing system Grammatica GNU grammati EBNF LL No Readable generated ca.percede rberg.net/ parse code © Icinetic 2012 15
  • 16. MDSD: Editors Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 16
  • 17. Textual Model Editors  DDD Textual DSL  Essential Text Editor © Icinetic 2012 17
  • 18. Graphical Model Editors  MS DSL Tools  WinForms  WPF  Custom:  WinForms  WPF  Third party tools: Visio, EA, etc. © Icinetic 2012 18
  • 19. Graphical Model Editors  MS DSL Tools  WinForms  WPF  Custom:  WinForms  WPF  Third party tools: Visio, EA, etc. © Icinetic 2012 19
  • 20. Graphical Model Editors  MS DSL Tools  WinForms  WPF  Custom:  WinForms  WPF  Third party tools: Visio, EA, etc. © Icinetic 2012 20
  • 21. Graphical Model Editors  MS DSL Tools  WinForms  WPF  Custom:  WinForms  WPF  Third party tools: Visio, EA, etc. © Icinetic 2012 21
  • 22. Other Model Editors  Tables  Trees © Icinetic 2012 22
  • 23. MDSD: Reverse engineering Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 23
  • 24. Reverse Engineering  External assets to model  Sources:  Databases  EDMX Database importer  Services  Custom parsers  Legacy code  Custom parsers © Icinetic 2012 24
  • 25. MDSD: Model Checkers Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 25
  • 26. Model Checkers: Validation Engine  MS DSL Tools  AOP  IDE integration  Hollywood Principle © Icinetic 2012 26
  • 27. Models Checkers: Validation Engine  Essential  AST + Visitor  Two phase checking  Syntax check  Model Merge  Reference resolver  Semantic check  Validation FWK  Extensible © Icinetic 2012 27
  • 28. MDSD: Model Repositories Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 28
  • 29. Model Repositories  XML serialization to file  Text serialization to file  Relational DBMS  Documental DB / NoSQL © Icinetic 2012 29
  • 30. Model Repositories  XML serialization to file  Text serialization to file  Relational DBMS  Documental DB / NoSQL © Icinetic 2012 30
  • 31. Model Repositories  XML serialization to file  Text serialization to file  Relational DBMS  Documental DB / NoSQL © Icinetic 2012 31
  • 32. Model Repositories  XML serialization to file  Text serialization to file  Relational DBMS  Documental DB / NoSQL © Icinetic 2012 32
  • 33. MDSD: Transformations Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 33
  • 34. Transformations  M2T  Free text concatenation  XSL-T (No thanks!)  Text Template based  T4  StringTemplate  M2M  Imperative  Declarative © Icinetic 2012 34
  • 35. MDSD: M2T Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 35
  • 36. M2T: T4 Templates  Text Template Transformation Toolkit  Released in 2005 by Microsoft  Syntax:  Directives  Text blocks  Control blocks  Usages:  Standard  Precompiled: webResponseText=template.TransformText(); © Icinetic 2012. 36
  • 37. M2T: StringTemplate  Terrence Parr’s templates group Templates;  Dynamic templates genMail(msg) ::= << From: $msg.From:genRecipient()$  Strong separation of To: $msg.To:genRecipient(); separator=", "$ concerns: Model, View and Control Subject: $msg.Subject$ MESSAGE: ------------------------------ $msg.Message$  Good maintanability ------------------------------ >> genRecipient()::= << $it.FullName$ <$it.Email$> >> © Icinetic 2012. 37
  • 38. M2T: Template Engines Time to generate 5000 files of 5 Kb of average 40 35  T4 30  StringTemplate 25 Write File 20 Generation  Precompiled T4 15 Load/compile 10 5 0 T4 StringTemplate T4 Precompiled T4 StringTemplate Precompiled T4 Total time (ms) 392.935 56.483 48.894 Time(ms)/file 78,587 11,297 9,779 Time(ms)/MB 4.066,142 876,654 505,961 Improvement/T4 base x7 x8 © Icinetic 2012 38
  • 39. MDSD: M2M Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 39
  • 40. M2M: Imperative © Icinetic 2012 40
  • 41. M2M: Imperative © Icinetic 2012 41
  • 42. M2M: Declarative  Essential TRX  Rule-based language  Interpreted © Icinetic 2012 42
  • 43. MDSD: IDE Integration Metamodel(s) Textual Model Editor Reverse Visual Model Editor Engineering Model(s) Model Checker Model repository IDE Model Transformation M2M M2T Code Model Doc, etc. © Icinetic 2012 43
  • 44. IDE Integration 1. Model Editors VS packages Folders & Projects 2. Model checkers Generated & custom Errors validation code coexistence 3. Model to Text Generated assets tracking © Icinetic 2012 44
  • 45. Making sense of it all  Radarc  Plug-in on the top of Visual Studio  Modelling environment and code generation packetized by architectures © Icinetic 2012 45
  • 46. Radarc Formulas  A Formula is a code  Formulas available generator including:  ASP.NET WebForms  Models / DSLs  ASP.NET MVC  Editors  MVC + Azure  Traceability rules  Windows Phone 7  Best practices  DDD N-Layered  Templates  … and growing © Icinetic 2012 46
  • 48. Conclusions  Modelling and code generation technologies have matured a lot in the latest years  The .NET platform has a strong base of tools to make MDSD approaches feasible.  MDSD is not more a luxury, is a precision tool. Take profit! © Icinetic 2012 48
  • 49. Questions & (might be) Anwers © Icinetic 2012 49
  • 50. www.radarc.net @RadarcNet pjmolina.com/essential 50