Slides for the mdse-book.com chapter 3: MDSE Use cases
Complete set of slides now available:
Chapter 1 - http://www.slideshare.net/mbrambil/modeldriven-software-engineering-in-practice-chapter-1-introduction
Chapter 2 - http://www.slideshare.net/mbrambil/modeldriven-software-engineering-in-practice-chapter-2-mdse-principles
Chapter 3 - http://www.slideshare.net/jcabot/model-driven-software-engineering-in-practice-chapter-3-mdse-use-cases
Chapter 4 - http://www.slideshare.net/jcabot/modeldriven-software-engineering-in-practice-chapter-4
Chapter 5 - https://www.slideshare.net/mbrambil/modeldriven-software-engineering-in-practice-chapter-5-integration-of-modeldriven-in-development-processes
Chapter 6 - http://www.slideshare.net/jcabot/mdse-bookslideschapter6
Chapter 7 - http://www.slideshare.net/mbrambil/model-driven-software-engineering-in-practice-book-chapter-7-developing-your-own-modeling-language
Chapter 8 - http://www.slideshare.net/jcabot/modeldriven-software-engineering-in-practice-chapter-8-modeltomodel-transformations
Chapter 9 - https://www.slideshare.net/mbrambil/model-driven-software-engineering-in-practice-book-chapter-9-model-to-text-transformations-and-code-generation
Chapter 10 - http://www.slideshare.net/jcabot/mdse-bookslideschapter10managingmodels
This book discusses how approaches based on modeling can improve the daily practice of software professionals. This is known as Model-Driven Software Engineering (MDSE) or, simply, Model-Driven Engineering (MDE).
MDSE practices have proved to increase efficiency and effectiveness in software development. MDSE adoption in the software industry is foreseen to grow exponentially in the near future, e.g., due to the convergence of software development and business analysis.
This book is an agile and flexible tool to introduce you to the MDE and MDSE world, thus allowing you to quickly understand its basic principles and techniques and to choose the right set of MDE instruments for your needs so that you can start to benefit from MDE right away.
The first part discusses the foundations of MDSE in terms of basic concepts (i.e., models and transformations), driving principles, application scenarios and current standards, like the wellknown MDA initiative proposed by OMG (Object Management Group) as well as the practices on how to integrate MDE in existing development processes.
The second part deals with the technical aspects of MDSE, spanning from the basics on when and how to build a domain-specific modeling language, to the description of Model-to-Text and Model-to-Model transformations, and the tools that support the management of MDE projects.
The book covers introductory and technical topics, spanning definitions and orientation in the MD* world, metamodeling, domain specific languages, model transformations, reverse engineering, OMG's MDA, UML, OCL, ATL, QVT, MOF, Eclipse, EMF, GMF, TCS, xText.
http://www.mdse-book.com
Multi-Platform Chatbot Modeling and Deployment with the Xatkit Framework
Model-driven Software Engineering in practice: Chapter 3 - MDSE Use cases
1. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Teaching material for the book
Model-Driven Software Engineering in Practice
by Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Morgan & Claypool, USA, 2012.
www.mdse-book.com
MDSE USE CASES
Chapter #3
2. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
www.mdse-book.com
MDSE GOES FAR BEYOND
CODE-GENERATION
3. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
MDSE has many applications
• MDD is just the tip of the
iceberg
• And MDA a specific
“realization” of MDD when
using OMG standards
4. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Three killer MDSE applications
Code
Generation
Software
Modernization
Systems
interoperability
5. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
www.mdse-book.com
USE CASE1 – MODEL
DRIVEN DEVEOPMENT
6. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
MDD contribution: Communication
• Models capture and organize the understanding of the
system within a group of people
• Models as lingua franca between actors from business
and IT divisions
Requirements ImplementationAnalysis Design
M2M M2M M2T
7. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
MDD contribution: Productivity
• MDD (semi)automates software development
• In MDD, software is derived through a series of model-to-
model transformations (possibly) ending with a model-to-
text transformations that produces the final code
Original
model
1st
refinement
nth
refinement
Model-to-model
Transformation
Model-to-text
Transformation
...
8. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Executable models
• An executable model is a model complete enough to be
executable
• From a theoretical point of view, a model is executable
when its operational semantics are fully specified
• In practice, the executability of a model may depend on
the adopted execution engine
• models which are not entirely specified but that can be executed by
some advanced tools that are able to fill the gaps
• Completely formalized models that cannot be executed because an
appropriate execution engine is missing.
9. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Smart vs dumb execution engines
• CRUD operation typically account for 80% of the overall
software functionality
• Huge spared effort through simple generation rules
10. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Executable models
• Most popular: Executable UML models
• Executable UML development method (xUML) initially
proposed by Steve Mellor
• Based on an action language (kind of imperative
pseudocode)
• Current standards
• Foundational Subset for Executable UML Models (fUML)
• Action language is the Action Language for fUML (Alf)
• basically a textual notation for UML behaviors that can be attached to a
UML model
11. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Executable models: 2 main approaches
• Code generation: generating running code from a higher
level model in order to create a working application
• by means of a rule-based template engine
• common IDE tools can be used to render the source code
produced
• Model interpretation: interpreting the models and making
them run
• Non-empty intersection between the two options
12. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Code Generation
• Goal: generating running code from higher level models
• Like compilers producing executable binary files from source code
• Also known as model compilers
• Once the source code is generated state-of-the-art IDEs
can be used to manipulate the code
13. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Code Generation: Scope
14. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Code Generation: Benefits
• Intellectual property
• Separation of modeling and execution
• Multi-platform generation
• Generators simpler than interpreters
• Reuse of existing artefacts
• Adaptation to enterprise policies
• Better performances
15. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Code Generation: Partial Generation
• Input models are not complete & code generator is not
smart enough to derive or guess the missing information
• Programmers will need to complete the code manually
• Caution! Breaking the generation cycle is dangerous
Solutions:
• Defining protected areas in the code, which are the ones
to be manually edited by the developer
• Using round-trip engineering tools (not many available)
• Better to do complete generation of parts of the system
instead of partial generation of the full system
16. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Code Generation: Turing test
• A human judge examines the code generated by one
programmer and one code-generation tool for the same
formal specification. If the judge cannot reliably tell the
tool from the human, the tool is said to have passed the
test
17. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Model interpretation
• A generic engine parses and executes the model on-the-fly
using an interpretation approach
• Benefits
• Faster changes & Transparent (re)deployment
• Better portability (if the vendor supports several platforms)
• The model is the code. Easier model debugging
• No deployment
• Updates of the model at runtime
• Higher level abstraction of the system (implemented by the interpreter)
• Updates in the interpreter may result in automatic improvements of
your software
• Danger of becoming dependent of the application vendor.
Limited influence in the –ities of the SW
18. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Generation and interpretation
• Can be used together in the same process
• Interpretation at early protoyyping / debugging time
• Generation for production and deployment
• Hybrid solutions are possible:
• Model interpretation based on internal code generation
implementation
• Code generation that relies on predefined, configurable
components / framework at runtime. The generated code is e.g.,
XML descriptor / configurations of the components
19. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
www.mdse-book.com
USE CASE2 – SYSTEMS
INTEROPERABILITY
20. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Interoperability
• Ability of two or more systems to exchange information
(IEEE)
• Needed for collaborative work (e.g. using different tools),
tool and language evolution, system integration…
• Interoperability must be done at the syntactic and
semantic levels
21. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Model-Driven Interoperability
• MDSE techniques to bridge the interoperability gap
• The metamodels (i.e. “schemas”) of the two systems are
made explicit and aligned
• Transformations follow the alignment to move information
• Injectors (text-to-model) represent system A data as a model
(syntactic transformation)
• M2M transformation adapts the data to system B metamodel
(semantic transformation)
• Extractors (model-to-text) generate the final System B output data
(syntactic transformation).
22. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
MDI: Global schema
23. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
www.mdse-book.com
USE CASE3 – MODEL
DRIVEN REVERSE
ENGINEERING
24. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Need for reverse engineering
25. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Model-driven reverse engineering
• Why? Models provide an homogeneous and interrelated
representation of all legacy components.
No information loss: initial models have a 1:1
correspondance with the code
Discover
Models
Understand
Viewpoints
Regenerate
New
So0ware
Ar4facts
Legacy
ar)facts
:
-‐
source
code
-‐
configura4on
files
-‐
tests
-‐
databases
-‐
etc.
26. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Model-Driven Interoperability: Example
COBOL
model
Model
discovery
COBOL
system
COBOL
metamodel
T2M
Model
understanding
Model
generation
UML
models
UML
metamodel
M2M
M2M (refactorings)
Java
model
Java
system
Java
metamodel
M2M M2T
27. Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Model-Driven Software Engineering In Practice. Morgan & Claypool 2012.
Teaching material for the book
Model-Driven Software Engineering in Practice
by Marco Brambilla, Jordi Cabot, Manuel Wimmer.
Morgan & Claypool, USA, 2012.
www.mdse-book.com
MODEL-DRIVEN SOFTWARE
ENGINEERING IN PRACTICE
Marco Brambilla,
Jordi Cabot,
Manuel Wimmer.
Morgan & Claypool, USA, 2012.
www.mdse-book.com
www.morganclaypool.com
or buy it at: www.amazon.com