introduction to model driven engineering using eclipse ...€¦ · model driven development engine...

49
1 © Copyright MDE Systems 2008 Introduction to Model Driven Engineering using Eclipse Frameworks Bruce Trask Angel Roman MDE Systems Model Driven Development Generator Abstraction Refinement Model Driven Development

Upload: others

Post on 10-Aug-2020

22 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

1© Copyright MDE Systems 2008

Introduction to Model Driven Engineering using Eclipse

Frameworks

Bruce Trask

Angel Roman

MDE Systems

Model

Driven

Development

Generator

Abstraction

Refinement

Model

Driven

Development

Page 2: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

2© Copyright MDE Systems 2008

Agenda• Part I

– What is Model Driven Engineering

• Part II

– MDE, Eclipse in Action, Live Demo

– Questions and Answers

Page 3: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

3© Copyright MDE Systems 2008

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

Page 4: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

4© Copyright MDE Systems 2008

Summary

Model

Driven

Development

Generator

Abstraction

Refinement

Model

Driven

Development

Page 5: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

5© Copyright MDE Systems 2008

Complexity and Change

Page 6: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

6© Copyright MDE Systems 2008

Abstraction Gap

Page 7: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

7© Copyright MDE Systems 2008

Software Engineering/Computer Science

• Raising the level of Abstraction

• Introducing layers of indirection to solve problems1

1 Dennis DeBruler, Refactoring, Fowler et. al. Addison Wesley 1999

Page 8: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

8© Copyright MDE Systems 2008

Components

Frameworks

Middleware

Libraries

APIs

OS

HW

Language and Platform

Change

Complexity

TEAM

Page 9: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

9© Copyright MDE Systems 2008

Components

Frameworks

Middleware

Libraries

APIs

OS

HW

Language and Platform – where we are now

Change

Complexity

TEAM

Cla

ssic

Pro

duct

Lin

e

Assets

Page 10: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

10© Copyright MDE Systems 2008

Rote vs. Creative Code

Page 11: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

11© Copyright MDE Systems 2008

Domain Specific vs. Domain Independent Code

Page 12: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

12© Copyright MDE Systems 2008

Duplicate vs. Unique Code

Page 13: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

13© Copyright MDE Systems 2008

What’s underneath the problems

• Language technology has not kept pace with platform technology1

• 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

Page 14: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

14© Copyright MDE Systems 2008

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

Page 15: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

15© Copyright MDE Systems 2008

Models - participants

Page 16: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

16© Copyright MDE Systems 2008

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 draw1 – relate to domain/product

• “Doing more with less” [Unknown]

1Random House Unabridged Dictionary 2nd Edition, Random House 1993

Page 17: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

17© Copyright MDE Systems 2008

Abstraction - Language

Page 18: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

18© Copyright MDE Systems 2008

Groups of Abstractions

• Groups of abstractions are used to tackle complex problems

• Abstractions have particular relationships and can be combined in meaningful ways1

• New names, new relationships

• Creation of a vocabulary and grammar = language1

1Software Factories, Greenfield et. al. Wiley 2004

Page 19: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

19© Copyright MDE Systems 2008

Abstraction

PackagingPatterns

Tools

Frameworks

Libraries

Pattern

Language

Components

Languages

ABSTRACTION

Traditional

Software Product

Line

Assets

MDD

Artifacts

Page 20: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

20© Copyright MDE Systems 2008

Abstraction

Refinement Control

Productivity/Power

Page 21: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

21© Copyright MDE Systems 2008

Model Driven Development• Program with Models

• Create Models that can be processed by a machined to produce lower level abstraction artifacts

• Language - Editor - Generator

Page 22: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

22© Copyright MDE Systems 2008

Model Driven Development

The Anatomy and Pattern

Page 23: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

23© Copyright MDE Systems 2008

Page 24: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

24© Copyright MDE Systems 2008

Purpose

• Language– define the abstract syntax, or grammar, upon which

the editor, serialization concrete syntax, and in-memory 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.

Page 25: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

25© Copyright MDE Systems 2008

Page 26: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

26© Copyright MDE Systems 2008

Page 27: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

27© Copyright MDE Systems 2008

Synonyms• Model Driven Development

• Domain Specific Language

Page 28: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

28© Copyright MDE Systems 2008

Language

Page 29: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

29© Copyright MDE Systems 2008

Language

Vocabulary

+ Grammar

= Language

Page 30: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

30© Copyright MDE Systems 2008

Metamodel

Object oriented representation of

the grammar of a language

Page 31: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

31© Copyright MDE Systems 2008

Sidebar

Page 32: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

32© Copyright MDE Systems 2008

Non Software Example “Domain Independent”

Page 33: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

33© Copyright MDE Systems 2008

Non Software Example

“Domain Specific”

Page 34: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

34© Copyright MDE Systems 2008

Non Software Example

“Domain Specific”

Page 35: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

35© Copyright MDE Systems 2008

Domain Specific Language

• Model concepts found in a specific domain

• Contrast to General Purpose Language –encodes generic abstractions

Page 36: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

36© Copyright MDE Systems 2008

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

Page 37: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

37© Copyright MDE Systems 2008

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

Page 38: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

38© Copyright MDE Systems 2008

Framework

• Abstract architectures

and classes that

provide a partial

solution to a family of

problems.

Page 39: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

39© Copyright MDE Systems 2008

DSLs, Models and Frameworks

Page 40: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

40© Copyright MDE Systems 2008

Making it actually happen

Page 41: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

41© Copyright MDE Systems 2008

Language Workbench1

Domain Model

Serializer

Observer

Reflection

Metamodel

Grammar

Model View

Controller

Command

Graphical

Framework

Chain of

Responsibility

Abstract

Factory

Factory

Method

State

Template

View Visitor Strategy

Serializer

http://www.martinfowler.com/articles/languageWorkbench.html

Page 42: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

42© Copyright MDE Systems 2008

Language Workbench

Workbench

Modeling

Framework

Workbench

Generator

Framework

Workbench

Graphical

Editor

Framework

Workbench

Testing

Framework

Workbench

Graphical

Modeling

Framework

Workbench

Debugging

Framework

Workbench

Constraint

Framework

Workbench

Transformation

Framework

Language

Workbench

Page 43: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

43© Copyright MDE Systems 2008

Eclipse1

http://www.martinfowler.com/articles/languageWorkbench.html

Page 44: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

44© Copyright MDE Systems 2008

Eclipse – Language Workbench

Page 45: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

45© Copyright MDE Systems 2008

Tasks

Page 46: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

46© Copyright MDE Systems 2008

Workbench

Modeling

Framework

Workbench

Generator

Framework

Workbench

Graphical

Editor

Framework

Workbench

Testing

Framework

Workbench

Graphical

Modeling

Framework

Workbench

Debugging

Framework

Workbench

Constraint

Framework

Workbench

Transformation

Framework

Language

Workbench

Workbench

Textual

Modeling

Framework

Launch

Framework

JET

xPand

M2T

EMF

GEF

ATL

oAW

M2M

M2T

TMF

ELF

ETM

EVF

GMF

EDF

xUnit

TPTP

Frameworks and Projects

Page 47: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

47© Copyright MDE Systems 2008

Eclipse as a Model Driven Development

EngineEclipse

Modeling

Framework

Java

Emitter

Templates

Graphical

Editor

Framework

Eclipse

Testing

Framework

Graphical

Modeling

Framework

Eclipse

Debugging

Framework

Eclipse

Constraint

Framework

Eclipse

Transformation

Framework

(ATL)

Domain

Specific

Graphics

Domain

Specific

Models

Domain

Specific

Generators

Domain

Specific

Debuggers

Domain

Specific

Graphics

Mapping

Domain

Specific

Constraints

Domain

Specific

Test

Domain

Specific

Transformations

Page 48: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

48© Copyright MDE Systems 2008

Part 2

Model Driven Development, Software Product Lines

and Eclipse

in Action

Live Demo

Page 49: Introduction to Model Driven Engineering using Eclipse ...€¦ · Model Driven Development Engine ModelingEclipse Framework Java Emitter Templates Graphical Editor Framework Eclipse

49© Copyright MDE Systems 2008