magritte - a meta-driven approach to empower developers and end users
DESCRIPTION
Model-driven engineering is a powerful approach to build large-scale applications. However, an application's metamodel often remains static after the initial development phase and cannot be changed unless a new development effort occurs. Yet, end users often need to rapidly adapt their applications to new needs. In many cases, end users would know how to make the required adaptations, if only the application would let them do so. In this paper we present how we built a runtime-dynamic meta-environment into Smalltalk's reflective language model. Our solution offers the best of both worlds: developers can develop their applications using the same tools they are used to and gain the power of meta-programming. We show in particular that our approach is suitable to support end user customization without writing new code: the adaptive model of Magritte not only describes existing classes, but also lets end users build their own metamodels on the fly.TRANSCRIPT
MagritteA Meta-Driven Approach to Empower
Developers and End Users
Lukas Renggli
Stéphane Ducasse
Adrian Kuhn
University of Bern, Switzerland
Software Composition Group
Roadmap
Problem
Demo
Implementation
Evaluation
Questions
What is the problem?
Rapidly changing
requirements
End users would
know their requirements
What did we see?
Meta-driven
software
Developer defined
meta-model
End user defined
meta-model
Run-time dynamic
meta-model
Domain Model
Metamodel
Meta-
Metamodel
<described-by>
<described-by>
Developer
End User
Domain Model
Metamodel
Meta-
Metamodel
Magritte
Developer
<described-by>
<described-by>
Magritte
End User
How does it work?
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
[Yoder et al, 2001] Architecture and design of adaptive object models
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
[Yoder et al, 2001] Architecture and design of adaptive object models
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) MagritteComponent
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) MagritteComponent
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) MagritteComponent
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Component
TypeComponent
Property
TypeProperty
1 *
1
*
*1
*
1
Type Object
Type Object
(a) Type-Square
Object
Description
Typ
e
Ob
ject
*
*
descrip
tio
n
attributes
1 *
(b) Magritte
Describe Objects
Describe Descriptions
Describe Constraints
Describe Behavior
Squeak is a modern open-source development environment for
the classic Smalltalk-80 programming language. Despite being the
first purely object-oriented language and environment, Smalltalk
is in many ways still far ahead of its successors in promoting a
vision of an environment where everything is an object, and
anything can change at run-time.
Squeak by Example, intended for both students and developers,
will guide you gently through the Squeak language and
environment by means of a series of examples and exercises.
This book is made available under the Creative Commons
Attribution-ShareAlike 3.0 license. You can either download the
PDF for free, or you can buy a softcover copy from lulu.com.
Additional material is available from the book's web page at
SqueakByExample.org, hosted by the University of Bern,
Switzerland.
Squeak by Example is endorsed by ESUG, the European Smalltalk
User Group. To learn more about Smalltalk and ESUG, see
www.esug.org.
by Example
Square Bracket Associates
with Damien Cassou and Marcus Denker
Version of 2007-09-13
Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet
SqueakSq
ueak b
y Examp
leB
lack!•!D
ucasse
!•!N
ierstrasz!•!P
ollet
3341027839529
ISBN 978-3-9523341-0-2
Smalltalkwww.squeak.org
ww
w.s
que
akb
yexa
mp
le.o
rg
Reflection
Integration with Tools
Class Extension
What can we do with it?
Automatic Views
Automatic Editors
Automatic Validation
Move Page
Automatic Reports
Automatic Querying
Automatic Persistency
What did we gain?
Reduce recurrent workGet rid of
Describe once,
get everywhere
Extensible
Object Model
Adaptive object modelRun-time
Code Generation
End users
customizability
Industrial Users
AareWorkflow definition
and runtime system
Magritte
[Ren
é M
agrit
te, 1
966]
Dec
alco
man
ia
www.lukas-renggli.ch
LOC Comparison
SmallWiki
Model
1561 LOC
44%
View
1983 LOC
56%
Pier
Model
3078 LOC
63%
View
1812 LOC
37%
Meta-describedTraditional
0
2,250
4,500
6,750
9,000
Traditional Meta-Described
8,190
2,456
Speed Comparison