logo资料库

Model-Driven Software Engineering in Practice: Second Edition.pdf

第1页 / 共207页
第2页 / 共207页
第3页 / 共207页
第4页 / 共207页
第5页 / 共207页
第6页 / 共207页
第7页 / 共207页
第8页 / 共207页
资料共207页,剩余部分请下载后查看
Foreword
Acknowledgments
Introduction
Purpose and Use of Models
Modeling for Software Development
How to Read this Book
MDSE Principles
MDSE Basics
Lost in Acronyms: The MD* Jungle
Overview of the MDSE Methodology
Overall Vision
Domains, Platforms, and Technical Spaces
Modeling Languages
Metamodeling
Transformations
Tool Support
Drawing Tools vs. Modeling Tools
Model-based vs. Programming-based MDSE Tools
Eclipse and EMF
Adoption and Criticisms of MDSE
MDSE Use Cases
Automating Software Development
Code Generation
Model Interpretation
Combining Code Generation and Model Interpretation
System Interoperability
Reverse Engineering
Modeling the Organization
Business Process Modeling
Enterprise Architecture
Model-driven Architecture (MDA)
MDA Definitions and Assumptions
The Modeling Levels: CIM, PIM, PSM
Mappings
General-purpose and Domain-specific Languages in MDA
Architecture-driven Modernization (ADM)
Integration of MDSE in your Development Process
Introducing MDSE in your Software Development Process
Pains and Gains of Software Modeling
Socio-technical Congruence of the Development Process
Traditional Development Processes and MDSE
Agile and MDSE
Domain-driven Design and MDSE
Test-driven Development and MDSE
Model-driven Testing
Test-driven Modeling
Software Product Lines and MDSE
Modeling Languages at a Glance
Anatomy of Modeling Languages
Multi-view Modeling and Language Extensibility
General-purpose vs. Domain-specific Modeling Languages
General-purpose Modeling: The Case of UML
Design Practices
Structure Diagrams (or Static Diagrams)
Behavior Diagrams (or Dynamic Diagrams)
UML Tools
Criticisms and Evolution of UML
UML Extensibility: The Middle Way Between GPL and DSL
Stereotypes
Predicates
Tagged Values
UML Profiling
Overview on DSLs
Principles of DSLs
Some Examples of DSLs
Defining Modeling Constraints (OCL)
Developing your Own Modeling Language
Metamodel-centric Language Design
Example DSML: sWML
Abstract Syntax Development
Metamodel Development Process
Metamodeling in Eclipse
Concrete Syntax Development
Graphical Concrete Syntax (GCS)
Textual Concrete Syntax (TCS)
A Real-world Example: IFML
Requirements
Fulfilling the Requirements in IFML
Metamodeling Principles
IFML Metamodel
IFML Concrete Syntax
Model-to-Model Transformations
Model Transformations and their Classification
Exogenous, Out-place Transformations
Endogenous, In-place Transformations
Mastering Model Transformations
Divide and Conquer: Model Transformation Chains
HOT: Everything is a Model, Even Transformations!
Beyond Batch: Incremental and Lazy Transformations
Bi-directional Model Transformations
Model-to-Text Transformations
Basics of Model-driven Code Generation
Code Generation Through Programming Languages
Code Generation Through M2T Transformation Languages
Benefits of M2T Transformation Languages
Template-based Transformation Languages: An Overview
Acceleo: An Implementation of the M2T Transformation Standard
Mastering Code Generation
Excursus: Code Generation through M2M Transformations and TCS
Managing Models
Model Interchange
Model Persistence
Model Comparison
Model Versioning
Model Co-evolution
Global Model Management
Model Quality
Verifying Models
Testing and Validating Models
Reviewing Models
Collaborative Modeling
Summary
Bibliography
Authors' Biographies
Index
Model-Driven Software Engineering in Practice Second Edition
Synthesis Lectures on Software Engineering Editor Luciano Baresi, Politecnico di Milano e Synthesis Lectures on Software Engineering series publishes short books (75-125 pages) on conceiving, specifying, architecting, designing, implementing, managing, measuring, analyzing, validating, and verifying complex software systems. e goal is to provide both focused monographs on the different phases of the software process and detailed presentations of frontier topics. Premier software engineering conferences, such as ICSE, ESEC/FSE, and ASE will help shape the purview of the series and make it evolve. Model-Driven Software Engineering in Practice: Second Edition Marco Brambilla, Jordi Cabot, and Manuel Wimmer 2017 Testing iOS Apps with HadoopUnit: Rapid Distributed GUI Testing Scott Tilley and Krissada Dechokul 2014 Hard Problems in Software Testing: Solutions Using Testing as a Service (TaaS) Scott Tilley and Brianna Floss 2014 Model-Driven Software Engineering in Practice Marco Brambilla, Jordi Cabot, and Manuel Wimmer 2012
Copyright © 2017 by Morgan & Claypool All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotations in printed reviews, without the prior permission of the publisher. Model-Driven Software Engineering in Practice: Second Edition Marco Brambilla, Jordi Cabot, and Manuel Wimmer www.morganclaypool.com ISBN: 9781627057080 ISBN: 9781627059886 ISBN: 9781627056953 paperback ebook epub DOI 10.2200/S00751ED2V01Y201701SWE004 A Publication in the Morgan & Claypool Publishers series SYNTHESIS LECTURES ON SOFTWARE ENGINEERING Lecture #4 Series Editor: Luciano Baresi, Politecnico di Milano Series ISSN Print 2328-3319 Electronic 2328-3327
Model-Driven Software Engineering in Practice Second Edition Marco Brambilla Politecnico di Milano, Italy Jordi Cabot ICREA and Open University of Catalonia (UOC), Spain Manuel Wimmer TU Wien, Austria SYNTHESIS LECTURES ON SOFTWARE ENGINEERING #4 CM&cLaypoolMorganpublishers&
ABSTRACT is book discusses how model-based approaches can improve the daily practice of software pro- fessionals. is 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 devel- opment, as demonstrated by various quantitative and qualitative studies. 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. e aim of this book is to provide you with an agile and flexible tool to introduce you to the MDSE world, thus allowing you to quickly understand its basic principles and techniques and to choose the right set of MDSE instruments for your needs so that you can start to benefit from MDSE right away. e book is organized into two main parts. • e 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 well-known MDA initiative proposed by OMG (Object Management Group) as well as the practices on how to integrate MDSE in existing development processes. • e 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 MDSE projects. e second edition of the book features: • a set of completely new topics, including: full example of the creation of a new modeling language (IFML), discussion of modeling issues and approaches in specific domains, like business process modeling, user interaction modeling, and enterprise architecture • complete revision of examples, figures, and text, for improving readability, understandabil- ity, and coherence • better formulation of definitions, dependencies between concepts and ideas • addition of a complete index of book content KEYWORDS modeling, software engineering, UML, domain-specific language, model-driven engineering, code generation, reverse engineering, model transformation, MDD, MDA, MDE, MDSE, OMG, DSL, EMF, Eclipse
Contents vii 1 2 3 Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Purpose and Use of Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Modeling for Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 How to Read this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 MDSE Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 MDSE Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Lost in Acronyms: e MD* Jungle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Overview of the MDSE Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.1 Overall Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.2 Domains, Platforms, and Technical Spaces . . . . . . . . . . . . . . . . . . . . . . . 11 2.3.3 Modeling Languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.4 Metamodeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.5 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Tool Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.1 Drawing Tools vs. Modeling Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.2 Model-based vs. Programming-based MDSE Tools . . . . . . . . . . . . . . . . 20 2.4.3 Eclipse and EMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Adoption and Criticisms of MDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.5 MDSE Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Automating Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1 3.1.1 Code Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.1.2 Model Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.1.3 Combining Code Generation and Model Interpretation. . . . . . . . . . . . . 32 System Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.2 3.3 Reverse Engineering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.4 Modeling the Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.4
viii 4 5 6 3.4.1 Business Process Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.4.2 Enterprise Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Model-driven Architecture (MDA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.1 MDA Definitions and Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2 e Modeling Levels: CIM, PIM, PSM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.4 General-purpose and Domain-specific Languages in MDA . . . . . . . . . . . . . . . 49 4.5 Architecture-driven Modernization (ADM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Integration of MDSE in your Development Process . . . . . . . . . . . . . . . . . . . . . . 53 Introducing MDSE in your Software Development Process . . . . . . . . . . . . . . . 53 5.1 5.1.1 Pains and Gains of Software Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.1.2 Socio-technical Congruence of the Development Process . . . . . . . . . . . . 54 Traditional Development Processes and MDSE . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2 5.3 Agile and MDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4 Domain-driven Design and MDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.5 Test-driven Development and MDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.5.1 Model-driven Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.5.2 Test-driven Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Software Product Lines and MDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.6 Modeling Languages at a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.1 Anatomy of Modeling Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.2 Multi-view Modeling and Language Extensibility . . . . . . . . . . . . . . . . . . . . . . . 64 6.3 General-purpose vs. Domain-specific Modeling Languages . . . . . . . . . . . . . . . 65 6.4 General-purpose Modeling: e Case of UML . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.4.1 Design Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.4.2 Structure Diagrams (or Static Diagrams) . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.4.3 Behavior Diagrams (or Dynamic Diagrams) . . . . . . . . . . . . . . . . . . . . . . 70 6.4.4 UML Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 6.4.5 Criticisms and Evolution of UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 UML Extensibility: e Middle Way Between GPL and DSL . . . . . . . . . . . . . 74 6.5.1 Stereotypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.5.2 Predicates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.5.3 Tagged Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.5.4 UML Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.5
分享到:
收藏