Introduction to Model Driven Engineering using Eclipse Model Driven Development Generator s Bruce Trask Angel Roman MDE Systems Abstraction Model Driven Development Refinement 1
Part I Agenda What is Model Driven Engineering Part II MDE, Eclipse in Action, Live Demo Questions and Answers 2
Warning The live demo in this tutorial is real and contains pictures of coding done without model driven development. Some of the scenes you will see may not be appropriate for children under the age of 13 3
Model Driven Development Summary Abstraction Model Driven Development Generator Refinement 4
Complexity and Change 5
Abstraction Gap 6
Software Engineering/Computer Science Raising the level of Abstraction Introducing layers of indirection to solve problems 1 1 Dennis DeBruler, Refactoring, Fowler et. al. Addison Wesley 1999 7
Language and Platform Complexity Change TEAM Components s Middleware Libraries APIs OS HW 8
Language and Platform where we are now Change Complexity TEAM Components s Middleware Libraries APIs OS HW Classic Product Line Assets 9
Rote vs. Creative Code 10
Domain Specific vs. Domain Independent Code 11
Duplicate vs. Unique Code 12
What s underneath the problems Language technology has not kept pace with platform technology 1 Insufficient linguistic power to tackle platform and domain complexity Lack of tools to deal with increased complexity 1 Douglas C. Schmidt IEEE Computer Magazine February 2006 13
Solution Leverage recent critical innovations to provide a quantum leap of language technology and tools to overcome the complexity gap Eclipse provides the necessary tools to make this happen 14
Models - participants 15
Abstract(ion) Thought of as apart from concrete realities, specific objects, or actual instances Expressing a quality or characteristic apart from any specific object or instance 1 Derivation: abs away or away from, tract to pull or draw 1 relate to domain/product Doing more with less [Unknown] 1 Random House Unabridged Dictionary 2 nd Edition, Random House 1993 16
Abstraction - Language 17
Groups of Abstractions Groups of abstractions are used to tackle complex problems Abstractions have particular relationships and can be combined in meaningful ways 1 New names, new relationships Creation of a vocabulary and grammar = language 1 1 Software Factories, Greenfield et. al. Wiley 2004 18
Abstraction Packaging Patterns Pattern Language Tools MDD Artifacts ABSTRACTION Libraries Languages s Components Traditional Software Product Line Assets 19
Abstraction Productivity/Power Refinement Control 20
Model Driven Development Program with Models Create Models that can be processed by a machined to produce lower level abstraction artifacts Language - Editor - Generator 21
Model Driven Development The Anatomy and Pattern 22
23
Purpose Language define the abstract syntax, or grammar, upon which the editor, serialization concrete syntax, and inmemory concrete syntax are based. Editor The purpose of the editor is to render, capture and express design intent Generator Provides automatic ways to get to lower levels of more executable forms of code. Provides the actual meaning or semantics to the higher levels of abstractions. 24
25
26
Synonyms Model Driven Development Domain Specific Language 27
Language 28
Language Vocabulary + Grammar = Language 29
Metamodel Object oriented representation of the grammar of a language 30
Sidebar 31
Non Software Example Domain Independent 32
Non Software Example Domain Specific 33
Non Software Example Domain Specific 34
Domain Specific Language Model concepts found in a specific domain Contrast to General Purpose Language encodes generic abstractions 35
Editor Textual Syntax and highlighting, intellisense Graphical Domain Specific Graphics Meant for the human Nominated to a first class MDD participant Constraints at modeling time See the design Program in terms of domain elements and relationships Declarative 36
Generator Where the rubber meets the road in MDD Correct by construction Best Practice and Design Pattern replication Programming Power Maintainability two sides of the same coin when bug occurs Portability of design Opens the world up to new programmers 37
Abstract architectures and classes that provide a partial solution to a family of problems. 38
DSLs, Models and s 39
Making it actually happen 40
Language Workbench 1 http://www.martinfowler.com/articles/languageworkbench.html State Model View Controller Domain Model Serializer Observer Serializer Command Graphical Grammar Reflection Metamodel Chain of Responsibility Template View Visitor Strategy Abstract Factory Factory Method 41
Language Workbench Workbench Generator Workbench Modeling Workbench Debugging Workbench Graphical Editor Language Workbench Workbench Graphical Modeling Workbench Transformation Workbench Testing Workbench Constraint 42
Eclipse 1 http://www.martinfowler.com/articles/languageworkbench.html 43
Eclipse Language Workbench 44
Tasks 45
46 Workbench Modeling Workbench Generator Workbench Graphical Editor Workbench Testing Workbench Graphical Modeling Workbench Debugging Workbench Constraint Workbench Transformation Language Workbench Workbench Textual Modeling Launch JET xpand M2T EMF GEF ATL oaw M2M M2T TMF ELF ETM EVF GMF EDF xunit TPTP s and Projects
Eclipse as a Domain Specific Generators Model Driven Development Domain Specific Models Java Emitter Templates Domain Specific Debuggers Engine Eclipse Modeling Eclipse Debugging Domain Specific Graphics Graphical Editor Graphical Modeling Domain Specific Graphics Mapping Domain Specific Transformations Eclipse Transformation (ATL) Eclipse Testing Eclipse Constraint Domain Specific Constraints Domain Specific Test 47
Part 2 Model Driven Development, Software Product Lines and Eclipse in Action Live Demo 48
49