magritte magic

25
Magritte Magic Thursday, 25 August 11

Upload: esug

Post on 20-May-2015

1.398 views

Category:

Technology


2 download

DESCRIPTION

ESUG 2011, Edinburgh

TRANSCRIPT

Page 1: Magritte Magic

Magritte MagicThursday, 25 August 11

Page 2: Magritte Magic

Who we are

• Nick Ager

• Esteban Lorenzano

• No, we are not the creators of Magritte or experts.

• Lukas created it (and is the unique expert).

• But we use it a lot, and we love it.

Thursday, 25 August 11

Page 3: Magritte Magic

Magritte

• A meta-model for describing adaptive models.

• Generic. Can be realised in Seaside, Morphic, Cocoa/touch widgets, etc...

Thursday, 25 August 11

Page 4: Magritte Magic

• Introspection

• Reflection

• Documentation

• Viewer building

• Editor building

• Report building

• Data validation

• Query processing

Describe once, get everywhere

• Object persistency

• Object indexing

• Object setup

• Object verification

• Object adaption

• Object customization

• and much more

Thursday, 25 August 11

Page 5: Magritte Magic

• Introspection

• Reflection

• Documentation

• Viewer building

• Editor building

• Report building

• Data validation

• Query processing

Describe once, get everywhere

• Object persistency

• Object indexing

• Object setup

• Object verification

• Object adaption

• Object customization

• and much more

Thursday, 25 August 11

Page 6: Magritte Magic

Magritte

• Describe...

• ...any class,

• ...their attributes

• ...relationships

• ...some kind of “type”

• ...accessing and optionally other properties (anyone you need)

Thursday, 25 August 11

Page 7: Magritte Magic

Describing models

• Descriptions

• String, Number, Date, etc.

• OneToOne, OneToMany, etc.

• Accessors

• Selector, Pluggable, Chain, etc.

• Mementos

Thursday, 25 August 11

Page 8: Magritte Magic

So... what to do with all those descriptions?

Thursday, 25 August 11

Page 9: Magritte Magic

“The model”

Thursday, 25 August 11

Page 10: Magritte Magic

Interpreting descriptions

• Creating editors

• complex validations

• cancel/save (using mementos)

• Building custom interpretations

• Describing non-visual models

Thursday, 25 August 11

Page 11: Magritte Magic

Edit anything (1)

• #asComponent

• addValidation

• addForm: #()

• Custom component renderers

Thursday, 25 August 11

Page 12: Magritte Magic

Demo

Thursday, 25 August 11

Page 13: Magritte Magic

Edit anything (2)

• We saw Magritte-Seaside

• There is also Magritte-Morph

• And you can build your own

• Magritte-Reef

Thursday, 25 August 11

Page 14: Magritte Magic

Demo

Thursday, 25 August 11

Page 15: Magritte Magic

Build your own renderer

• You can create your own look and feel and behaviours

Thursday, 25 August 11

Page 16: Magritte Magic

Demo

Thursday, 25 August 11

Page 17: Magritte Magic

Describe and use

• The idea is to use magritte description capabilities to create unique, non-common, non-reusable, behaviors

• But still have the power of using a description (validation, etc.)

Thursday, 25 August 11

Page 18: Magritte Magic

We don’t have a demo for this, you have to believe us :)

Thursday, 25 August 11

Page 19: Magritte Magic

Describe anything

• JSON/XML

• Magritte-Glorp (DBXTalk: see talk tomorrow)

• Magritte-UML (just an idea)

Thursday, 25 August 11

Page 20: Magritte Magic

Demo

Thursday, 25 August 11

Page 21: Magritte Magic

Problems

• Where do I place my descriptions?

• Not everything can be described-then-transformed as I want

• for instance, not everything can be a “master-detail” and still be useful, but is hard to build a different implementation (not impossible, just hard)

Thursday, 25 August 11

Page 22: Magritte Magic

Magritte Issues

• Name collision with #description

• Cache-invalidation

• dynamic descriptions:

• instance specific descriptions

• context dependent descriptions

Thursday, 25 August 11

Page 23: Magritte Magic

Solutions

• rename #description to #magritteDescription

• move descriptions to instance-side

• Use <magritte>

Thursday, 25 August 11

Page 25: Magritte Magic

Questions?

Thursday, 25 August 11