mdd with executable uml models

23
Model-driven Development with Executable UML Models Rafael Chaves [email protected]

Upload: rachaves

Post on 21-Jun-2015

4.007 views

Category:

Documents


1 download

DESCRIPTION

Slide deck from a lecture given to a Software Engineering class at UVic (SENG330)

TRANSCRIPT

Page 1: MDD with Executable UML Models

Model-driven Development with Executable UML Models

Rafael [email protected]

Page 2: MDD with Executable UML Models

Small scale vs. large scale

Small

single developer

small feature set

short lived

Largeteam

large feature set

long lived

Page 3: MDD with Executable UML Models

Small scale vs. large scale

Small

work properly (once)

Large

understandable by others

throughout time

extensible

resilient to change

work properly (continuously)

Page 4: MDD with Executable UML Models

Enterprise software is very hard

Problem domains are typically not very complex (information management + business rules)

How come?

Secondary concerns abound

persistence, concurrency, (a)synchronism, distribution, transactions, security, caching, replication, logging, ...

Page 5: MDD with Executable UML Models

Two dominant dimensions

business domain concerns vs. technological or implementation concerns Completely different beasts(why treat them the same way?)

change rateabstraction level toolsskillsreuse

Current approaches won't cut it

Page 6: MDD with Executable UML Models

Model Driven Development to the rescue

Page 7: MDD with Executable UML Models

model: a simplified representation of something from a particular point of view and with a particular purpose

Page 8: MDD with Executable UML Models

Models in software

brainstormingcommunicatingdocumentingunderstanding (rev. eng.)

That is not what MDD is about

Page 9: MDD with Executable UML Models

Models in MDD

are the central artifacts in software (re: source vs. object code) are well-formedare precise*are complete*are executable (directly/code gen.)*are technology-independent*

Page 10: MDD with Executable UML Models

MDA pattern

source: MDA Guide (OMG)

Page 11: MDD with Executable UML Models

Technology-agnostic models

source: eclipse.org

Page 12: MDD with Executable UML Models

source: openarchitectureware.org

Code generation

Page 13: MDD with Executable UML Models

Model interpretation

Page 14: MDD with Executable UML Models

MDD with UML

Page 15: MDD with Executable UML Models

Relevant UML features

UML has always had support for modeling:

structure: classes, attributes, operations and relationships (class diagrams)dynamics: state machines (state diagrams)

Added in 1.5 (2003)/2.0 (2005):

behavior: action semantics (no standard notation, typically textual)

UML finally enabled for MDD

Page 16: MDD with Executable UML Models

source: UML 1.5 spec (OMG)

Page 17: MDD with Executable UML Models

Action Semantics: basic concepts

actions

input/output pins

data flows

activity nodes

activities

Page 18: MDD with Executable UML Models

Action Semantics: basic actions

read/write variable

create/destroy object

read self ("this")

read/write attribute

create/destroy link

call operation

activity node (block)call function

conditional (if/switch)

loop

raise exception

send signal

Page 19: MDD with Executable UML Models

newCustomer = new Customer();

source: UML 1.5 spec (OMG)

Page 20: MDD with Executable UML Models

current_account.balance = new_balance;

source: same

Page 21: MDD with Executable UML Models

if (factor == 2) { ... }

source: same

Page 22: MDD with Executable UML Models

Diagrams vs. Text

graphical representation not suitable for AS

models != diagrams (no loss of abstraction)

textual notations preferred (action languages)but... isn't UML required to be graphical?

but... aren't we back to coding?

Page 23: MDD with Executable UML Models

Model-driven Development with Executable UML Models

Rafael [email protected]