model-oriented programming: bridging the model-code divide modeling in software engineering (mise...

9
Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University of Ottawa [email protected] http://www.eecs.uottawa.ca/~tcl

Upload: lionel-lester

Post on 25-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Model-Oriented Programming:Bridging the Model-Code Divide

Modeling in Software Engineering (MiSE 2013)

Omar Badreddin, Timothy C. LethbridgeUniversity of Ottawa

[email protected]://www.eecs.uottawa.ca/~tcl

http://www.umple.org

Page 2: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Key Ideas ofModel-Oriented Programming (MOP)

It should be possible to• Use a ‘nice’ textual form for any modeling construct• Embed code in model• Embed model in code

Umple allows this transparently for• Java• C++• PhP• And even all at the same time!

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 2

Page 3: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Why Model-Oriented Programming

Real programmers still like code

Outside the critical systems domain, most models are just documentation

• And tend to be:—Wrong—Not executable anyway

Those of us who have done real model-driven development know doing so is a ‘no brainer’ for productivity + quality

• We just have to bridge the model-code divide

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 3

Page 4: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Why not just use a ‘UML Action Language’ like Alf?

We don’t really need yet another language for such elements

People want to• Leverage their existing code and libraries• Do this in small increments

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 4

Page 5: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Umple as a MOP tool

It ‘eats its own dogfood’• The Umple compiler is developed with itself• http://code.google.com/p/umple/source/browse/trunk/cru

ise.umple/src/Umple.ump• http://metamodel.umple.org

Umple allows embedding of code for• Methods• State machine actions, activities, guards• Arbitrary code before/after any generated API for

manipulating associations, attributes etc.

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 5

Page 6: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Examples

Small example: http://helloworld.umple.org

State machines: http://statemachines.umple.org

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 6

Page 7: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Evidence of benefit

Empirical studies show• Umple code is easier to understand than Java• Helps students learn to model: CSEE&T

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 7

Page 8: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 8

Avai

labi

lity

of a

text

ual f

orm

for m

odel

s and

dia

gram

sA

bilit

y to

edi

t dia

gram

or

text

& h

ave

the

othe

r ref

lect

cha

nges

Abi

lity

to g

ener

ate

code

to

repr

esen

t the

mod

el

Page 9: Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University

Questions?

T. Lethbridge MiSE 2013 - Umple - Model-Code Divide 9