SlideShare una empresa de Scribd logo
1 de 46
Descargar para leer sin conexión
Magritte




                             [René Magritte, 1966] Decalcomania
    www.lukas-renggli.ch
Software Composition Group
     University of Bern
Lukas Renggli
! Academics
  – PhD Student, University of Bern
! Industry
  – Independent Software Consultant
! Communities
  – Core-developer of Seaside
  – Author of Magritte and Pier
Agenda

!   Introduction and Example
!   History and Usage
!   Implementation Details
!   Adaptive Models
Magritte
Introduction and Example



    Describe once,
    Get everywhere
Address Object


               :Address
    street = 'Schützenmattstrasse'
    plz = 3012
    place = 'Bern'
    canton = 'Bern'
Address Class


           :Address                        Address
street = 'Schützenmattstrasse'   class street: String
plz = 3012                             plz: Integer
place = 'Bern'                         place: String
canton = 'Bern'                        canton: String
Address Description
                                                                          :StringDescription
                                                                   label = 'Street'

                                                                         :NumberDescription
                                                                   label = 'PLZ'
                                                                   required = true
           :Address                                                range = 1000..9999
street = 'Schützenmattstrasse'   description                              :StringDescription
                                                  :Container
plz = 3012                                                         label = 'Place'
                                               label = 'Address'
place = 'Bern'                                                     required = true
canton = 'Bern'
                                                                      :SingleOptionDescription
                                                                   label = 'Canton'
                                                                   required = true
                                                                   sorted = true
                                                                   options = #( 'Bern' 'Zurich' ... )
Address Description

                                 Magritte                                 :StringDescription
                                                                   label = 'Street'

                                                                         :NumberDescription
                                                                   label = 'PLZ'
                                                                   required = true
           :Address                                                range = 1000..9999
street = 'Schützenmattstrasse'   description                              :StringDescription
                                                  :Container
plz = 3012                                                         label = 'Place'
                                               label = 'Address'
place = 'Bern'                                                     required = true
canton = 'Bern'
                                                                      :SingleOptionDescription
                                                                   label = 'Canton'
                                                                   required = true
                                                                   sorted = true
                                                                   options = #( 'Bern' 'Zurich' ... )
Describe (1)
Address class>>#descriptionStreet
!  ^ MAStringDescription new
!  !   autoAccessor: #street;
!  !   label: 'Street';
!  !   priority: 100;
!  !   yourself

Address class>>#descriptionPlz
!  ^ MANumberDescription new
!  !   autoAccessor: #plz;
!  !   priority: 200;
!  !   label: 'PLZ';
!  !   beRequired;
!  !   min: 1000;
!  !   max: 9999;
!  !   yourself
Describe (2)
Address class>>#descriptionPlace
!  ^ MAStringDescription new
!  !   autoAccessor: #place;
!  !   label: 'Place';
!  !   priority: 300;
!  !   beRequired;
!  !   yourself

Address class>>#descriptionCanton
!  ^ MASingleOptionDescription new
!  !   options: #('Zuerich' 'Bern' 'Luzern' ...);
!  !   autoAccessor: #canton;
!  !   label: 'Canton';
!  !   priority: 400;
!  !   beRequired;
!  !   beSorted;
!  !   yourself
Interpret (1)

anAddress description do: [ :description |
  Transcript
     show: description label; show: ':'; tab;
     show: (description toString: (anAddress readUsing: description));
     cr ]



Street:!   Schutzenmattstrasse
PLZ:!      3012
Place:!    Bern
Canton:!   Bern
Interpret (2)
result := anAddress asMorph
!   addButtons;
!   addWindow;
!   callInWorld
Interpret (3)
result := self call: (anAddress asComponent
    addValidatedForm;
    yourself).




                                                  *
                                                  *
                                              *
What is it used for?
! Reflection            !   Object filtering
    – Introspection    !   Object serialization
    – Intercession     !   Object copying
!   Viewer building    !   Object indexing
!   Editor building    !   Object initialization
!   Report building    !   Object verification
!   Documentation      !   Object adaption
!   Data validation    !   Object customization
!   Query processing
                             and much more ...
Why is it useful?

!   Describe once, get everywhere.
!   Extensibility of classes is ensured.
!   Context dependent descriptions.
!   End-user customizable.
!   Developer configurable.
Why is it cool?

!   Describe once, get everywhere.
!   Be more productive.
!   Lower coupling.
!   Empower your users.
!   Do more, with less code.
!   Do more, with less hacking.
It seems a drag to me that you need to add 22 14 class
categories of Magritte, [...] I’d rather avoid Magritte. It’s a
PhD Master thesis, and so not optimized for simplicity.
People who use it, love it, I suppose. Probably makes
them feel smart.

                                        — Chris Cunnington
Magritte
History and Usage



 Describe once,
 Get everywhere
SmallWiki started as
                                                      University Project

2002
                                                              SmallWiki
                                                              released

2003
                                                     1st price in
                  Started with SmallWiki 2        ESUG Innovation
                    (meta-model based)           Technology Awards

2004
                                                    Changed development from
                                                      VisualWorks to Squeak
           Extracted        1st commercial                  SqueakMap
           Magritte       Magritte Application                release

2005
                                              Changed product name from
                                                   SmallWiki to Pier
                        Magritte: Meta-Described
                       Web Application Development

2006
                                                 3rd price in
                                              ESUG Innovation
                              seaside.st     Technology Awards

2007
                                     Magritte: A Meta-Driven Approach to
                                     Empower Developers and End Users
         Magritte
       on WikiPedia
2008
Aare
 Workflow definition
and runtime system
Magritte
Implementation Details



   Describe once,
   Get everywhere
Descriptions
! Problem
  – Objects and their values all need to be treated
    differently.
! Example
  – Boolean and String are not polymorphic, therefore
    different code for certain operations is necessary.
! Solution
  – Introduce a descriptive hierarchy that can be
    instantiated, configured and composed.
Type
                               Object
Component
                                                       Component
  Type                 1                         *
   1                                                            1

                      (a) Type-Square


    *                                                            *
 Property
                                                           Property
   Type                1                         *
                                Type
                               Object
   [Yoder et al, 2001] Architecture and design of adaptive object models
attributes
                                     attributes
                               1 1 * attributes
                                            *
                                         1
                                     Object     *
                                        Object *
                                                   *
                                            Object
                                                                                            *




                                                                            description
                                                                                          description
            Object
            Object
              Type
             Type




                                                                                                        description
         Object
          Type



                                         attributes
                               Description      *
                                  Description * *
                                       1
                                      Description
[Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users     *
attributes
                                     attributes
                               1 1 * attributes
                                            *
                                         1
                                     Object     *
                                        Object *
                                                   *
                                            Object
                                                                                            *




                                                                            description
                                                                                          description
            Object
            Object
              Type
             Type




                                                                                                        description
         Object
          Type



                                         attributes
                               Description      *
                                  Description * *
                                       1
                                      Description
[Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users     *
attributes
                                     attributes
                               1 1 * attributes
                                            *
                                         1
                                     Object     *
                                        Object *
                                                   *
                                            Object
                                                                                            *




                                                                            description
                                                                                          description
            Object
            Object
              Type
             Type




                                                                                                        description
         Object
          Type



                                         attributes
                               Description      *
                                  Description * *
                                       1
                                      Description
[Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users     *
Descriptions
                Composite pattern
           to describe model-instances.

Accessor               Description                   Condition



                        children
           Container                  ElementDesc.




                            StringDesc.         BooleanDesc.
Descriptions
                                                                                                   reference
                                           Description



                                            children
                         Container                        ElementDesc.




ColorDesc.           MagnitudeDesc.             StringDesc.             BooleanDesc.    ReferenceDesc.




             DateDesc.               NumberDesc.              OptionDesc.                          RelationDesc.




                                                SingleDesc.             MultipleDesc.    ToOneDesc.            ToManyDesc.
Accessors
! Problem
  – Data can be stored and accessed in different ways.
! Examples
  – Accessor methods, chains of accessor methods,
    instance-variables, dictionaries, derived values,
    external values, etc.
! Solution
  – Provide a strategy pattern to be able to access data
    through a common interface.
Accessors
                                Strategy pattern
                           to access model-entities.


next, accessor
                                                      Accessor




                 Cascade      Selector   Dictionary    Block     Null




                               Auto
o: Object          d: Description     a: Accessor

  readUsing: d

                           accessor

                                       read: o

                                      <strategy a>



write: v using: d

                           accessor

                                  write: v to: o

                                      <strategy a>
Mementos
! Problems
  – Editing might turn a model (temporarily) invalid.
  – Canceling an edit shouldn’t change the model.
  – Concurrent edits of the same model should be
    detected and (manually) merged.
! Solution
  – Introduce mementos that behave like the original
    model and that delay modifications until they are
    committed.
Mementos
                    Memento pattern
                to cache model-entities.

              description                          model
Description                    Memento                             Object




                                                       cache
                      Strait             Cached                   Dictionary



                                                       original
                                         Checked                  Dictionary
Magritte
Adaptive Models



Describe once,
Get everywhere
Rapidly changing
 requirements
Adaptive
   Model
+ copy()
   descriptions


                  values
                           Object




 Description
End users would
know their requirements
attributes
                                     attributes
                               1 1 * attributes
                                            *
                                         1
                                     Object     *
                                        Object *
                                                   *
                                            Object
                                                                                            *




                                                                            description
                                                                                          description
            Object
            Object
              Type
             Type




                                                                                                        description
         Object
          Type



                                         attributes
                               Description      *
                                  Description * *
                                       1
                                      Description
[Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users     *
Meta-
              Metamodel



            <described-by>


              Metamodel


Developer
            <described-by>


               Domain
               Model


End User
Meta-
  Metamodel



<described-by>


  Metamodel


                  Magritte
                 Developer
<described-by>


   Domain
   Model

                 Magritte
                 End User
Demo
Conclusion

!   Describe once, get everywhere.
!   Ensure extensibility and maintainability.
!   Automate repetitive tasks.
!   End-user customizability.
!   (Run-time) adaptive object model.

Más contenido relacionado

Destacado (20)

Mcdonals ppt
Mcdonals pptMcdonals ppt
Mcdonals ppt
 
Jeff Koons
Jeff KoonsJeff Koons
Jeff Koons
 
René magritte
René magritteRené magritte
René magritte
 
Surrealism and Perspective
Surrealism and PerspectiveSurrealism and Perspective
Surrealism and Perspective
 
Kill bill
Kill bill Kill bill
Kill bill
 
Nutella
NutellaNutella
Nutella
 
Magritte Blitz
Magritte BlitzMagritte Blitz
Magritte Blitz
 
Dali Powerpoint
Dali PowerpointDali Powerpoint
Dali Powerpoint
 
Saint patrick´s day
Saint patrick´s daySaint patrick´s day
Saint patrick´s day
 
Jeff koons
Jeff koonsJeff koons
Jeff koons
 
Christmas around the world
Christmas around the worldChristmas around the world
Christmas around the world
 
St. patrick's day
St. patrick's daySt. patrick's day
St. patrick's day
 
Mc Donalds
Mc DonaldsMc Donalds
Mc Donalds
 
Presentation5
Presentation5Presentation5
Presentation5
 
Salvador Dalí
Salvador DalíSalvador Dalí
Salvador Dalí
 
Nutella
NutellaNutella
Nutella
 
Salvador Dali
Salvador DaliSalvador Dali
Salvador Dali
 
Salvador dali ppt
Salvador dali pptSalvador dali ppt
Salvador dali ppt
 
Salvador Dalí
Salvador DalíSalvador Dalí
Salvador Dalí
 
Salvador Dalí
Salvador DalíSalvador Dalí
Salvador Dalí
 

Más de Lukas Renggli

Mastering Grammars with PetitParser
Mastering Grammars with PetitParserMastering Grammars with PetitParser
Mastering Grammars with PetitParserLukas Renggli
 
Natural Language Checking with Program Checking Tools
Natural Language Checking with Program Checking ToolsNatural Language Checking with Program Checking Tools
Natural Language Checking with Program Checking ToolsLukas Renggli
 
The Dynamic Language is not Enough
The Dynamic Language is not EnoughThe Dynamic Language is not Enough
The Dynamic Language is not EnoughLukas Renggli
 
Dynamic Language Embedding With Homogeneous Tool Support
Dynamic Language Embedding With Homogeneous Tool SupportDynamic Language Embedding With Homogeneous Tool Support
Dynamic Language Embedding With Homogeneous Tool SupportLukas Renggli
 
Seaside — Agile Software Development
Seaside — Agile Software DevelopmentSeaside — Agile Software Development
Seaside — Agile Software DevelopmentLukas Renggli
 
Domain-Specific Program Checking
Domain-Specific Program CheckingDomain-Specific Program Checking
Domain-Specific Program CheckingLukas Renggli
 
Embedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsEmbedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsLukas Renggli
 
Language Boxes — Bending the Host Language with Modular Language Changes
Language Boxes — Bending the Host Language with Modular Language ChangesLanguage Boxes — Bending the Host Language with Modular Language Changes
Language Boxes — Bending the Host Language with Modular Language ChangesLukas Renggli
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status MessageLukas Renggli
 
Seaside - The Revenge of Smalltalk
Seaside - The Revenge of SmalltalkSeaside - The Revenge of Smalltalk
Seaside - The Revenge of SmalltalkLukas Renggli
 
Seaside - On not getting bogged down
Seaside - On not getting bogged downSeaside - On not getting bogged down
Seaside - On not getting bogged downLukas Renggli
 
Seaside - Past, Present and Future
Seaside - Past, Present and FutureSeaside - Past, Present and Future
Seaside - Past, Present and FutureLukas Renggli
 
Magritte - A Meta-Driven Approach to Empower Developers and End Users
Magritte - A Meta-Driven Approach to Empower Developers and End UsersMagritte - A Meta-Driven Approach to Empower Developers and End Users
Magritte - A Meta-Driven Approach to Empower Developers and End UsersLukas Renggli
 
Transactional Memory for Smalltalk
Transactional Memory for SmalltalkTransactional Memory for Smalltalk
Transactional Memory for SmalltalkLukas Renggli
 
Seaside - Web Development As You Like It
Seaside - Web Development As You Like ItSeaside - Web Development As You Like It
Seaside - Web Development As You Like ItLukas Renggli
 
5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of SeasideLukas Renggli
 

Más de Lukas Renggli (18)

Mastering Grammars with PetitParser
Mastering Grammars with PetitParserMastering Grammars with PetitParser
Mastering Grammars with PetitParser
 
Natural Language Checking with Program Checking Tools
Natural Language Checking with Program Checking ToolsNatural Language Checking with Program Checking Tools
Natural Language Checking with Program Checking Tools
 
The Dynamic Language is not Enough
The Dynamic Language is not EnoughThe Dynamic Language is not Enough
The Dynamic Language is not Enough
 
Dynamic Language Embedding With Homogeneous Tool Support
Dynamic Language Embedding With Homogeneous Tool SupportDynamic Language Embedding With Homogeneous Tool Support
Dynamic Language Embedding With Homogeneous Tool Support
 
Seaside — Agile Software Development
Seaside — Agile Software DevelopmentSeaside — Agile Software Development
Seaside — Agile Software Development
 
Dynamic grammars
Dynamic grammarsDynamic grammars
Dynamic grammars
 
Domain-Specific Program Checking
Domain-Specific Program CheckingDomain-Specific Program Checking
Domain-Specific Program Checking
 
Embedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsEmbedding Languages Without Breaking Tools
Embedding Languages Without Breaking Tools
 
Language Boxes — Bending the Host Language with Modular Language Changes
Language Boxes — Bending the Host Language with Modular Language ChangesLanguage Boxes — Bending the Host Language with Modular Language Changes
Language Boxes — Bending the Host Language with Modular Language Changes
 
jQuery for Seaside
jQuery for SeasidejQuery for Seaside
jQuery for Seaside
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status Message
 
Seaside - The Revenge of Smalltalk
Seaside - The Revenge of SmalltalkSeaside - The Revenge of Smalltalk
Seaside - The Revenge of Smalltalk
 
Seaside - On not getting bogged down
Seaside - On not getting bogged downSeaside - On not getting bogged down
Seaside - On not getting bogged down
 
Seaside - Past, Present and Future
Seaside - Past, Present and FutureSeaside - Past, Present and Future
Seaside - Past, Present and Future
 
Magritte - A Meta-Driven Approach to Empower Developers and End Users
Magritte - A Meta-Driven Approach to Empower Developers and End UsersMagritte - A Meta-Driven Approach to Empower Developers and End Users
Magritte - A Meta-Driven Approach to Empower Developers and End Users
 
Transactional Memory for Smalltalk
Transactional Memory for SmalltalkTransactional Memory for Smalltalk
Transactional Memory for Smalltalk
 
Seaside - Web Development As You Like It
Seaside - Web Development As You Like ItSeaside - Web Development As You Like It
Seaside - Web Development As You Like It
 
5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside
 

Último

Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsApsara Of India
 
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一lvtagr7
 
Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Sonam Pathan
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)bertfelixtorre
 
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba Company
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...First NO1 World Amil baba in Faisalabad
 
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersQUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersSJU Quizzers
 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesApsara Of India
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingRiya Pathan
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Riya Pathan
 
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSHot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSApsara Of India
 
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsApsara Of India
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceTina Ji
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...Apsara Of India
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil Baba Company
 
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)dollysharma2066
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdfTanjirokamado769606
 

Último (20)

young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
 
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
 
Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
 
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
 
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersQUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
 
Call Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any TimeCall Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any Time
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
 
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSHot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
 
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Najafgarh Delhi 💯Call Us 🔝8264348440🔝
 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
 
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf
 

Magritte

  • 1. Magritte [René Magritte, 1966] Decalcomania www.lukas-renggli.ch Software Composition Group University of Bern
  • 2. Lukas Renggli ! Academics – PhD Student, University of Bern ! Industry – Independent Software Consultant ! Communities – Core-developer of Seaside – Author of Magritte and Pier
  • 3. Agenda ! Introduction and Example ! History and Usage ! Implementation Details ! Adaptive Models
  • 4. Magritte Introduction and Example Describe once, Get everywhere
  • 5. Address Object :Address street = 'Schützenmattstrasse' plz = 3012 place = 'Bern' canton = 'Bern'
  • 6. Address Class :Address Address street = 'Schützenmattstrasse' class street: String plz = 3012 plz: Integer place = 'Bern' place: String canton = 'Bern' canton: String
  • 7. Address Description :StringDescription label = 'Street' :NumberDescription label = 'PLZ' required = true :Address range = 1000..9999 street = 'Schützenmattstrasse' description :StringDescription :Container plz = 3012 label = 'Place' label = 'Address' place = 'Bern' required = true canton = 'Bern' :SingleOptionDescription label = 'Canton' required = true sorted = true options = #( 'Bern' 'Zurich' ... )
  • 8. Address Description Magritte :StringDescription label = 'Street' :NumberDescription label = 'PLZ' required = true :Address range = 1000..9999 street = 'Schützenmattstrasse' description :StringDescription :Container plz = 3012 label = 'Place' label = 'Address' place = 'Bern' required = true canton = 'Bern' :SingleOptionDescription label = 'Canton' required = true sorted = true options = #( 'Bern' 'Zurich' ... )
  • 9. Describe (1) Address class>>#descriptionStreet ! ^ MAStringDescription new ! ! autoAccessor: #street; ! ! label: 'Street'; ! ! priority: 100; ! ! yourself Address class>>#descriptionPlz ! ^ MANumberDescription new ! ! autoAccessor: #plz; ! ! priority: 200; ! ! label: 'PLZ'; ! ! beRequired; ! ! min: 1000; ! ! max: 9999; ! ! yourself
  • 10. Describe (2) Address class>>#descriptionPlace ! ^ MAStringDescription new ! ! autoAccessor: #place; ! ! label: 'Place'; ! ! priority: 300; ! ! beRequired; ! ! yourself Address class>>#descriptionCanton ! ^ MASingleOptionDescription new ! ! options: #('Zuerich' 'Bern' 'Luzern' ...); ! ! autoAccessor: #canton; ! ! label: 'Canton'; ! ! priority: 400; ! ! beRequired; ! ! beSorted; ! ! yourself
  • 11. Interpret (1) anAddress description do: [ :description | Transcript show: description label; show: ':'; tab; show: (description toString: (anAddress readUsing: description)); cr ] Street:! Schutzenmattstrasse PLZ:! 3012 Place:! Bern Canton:! Bern
  • 12. Interpret (2) result := anAddress asMorph ! addButtons; ! addWindow; ! callInWorld
  • 13. Interpret (3) result := self call: (anAddress asComponent addValidatedForm; yourself). * * *
  • 14. What is it used for? ! Reflection ! Object filtering – Introspection ! Object serialization – Intercession ! Object copying ! Viewer building ! Object indexing ! Editor building ! Object initialization ! Report building ! Object verification ! Documentation ! Object adaption ! Data validation ! Object customization ! Query processing and much more ...
  • 15. Why is it useful? ! Describe once, get everywhere. ! Extensibility of classes is ensured. ! Context dependent descriptions. ! End-user customizable. ! Developer configurable.
  • 16. Why is it cool? ! Describe once, get everywhere. ! Be more productive. ! Lower coupling. ! Empower your users. ! Do more, with less code. ! Do more, with less hacking.
  • 17. It seems a drag to me that you need to add 22 14 class categories of Magritte, [...] I’d rather avoid Magritte. It’s a PhD Master thesis, and so not optimized for simplicity. People who use it, love it, I suppose. Probably makes them feel smart. — Chris Cunnington
  • 18. Magritte History and Usage Describe once, Get everywhere
  • 19. SmallWiki started as University Project 2002 SmallWiki released 2003 1st price in Started with SmallWiki 2 ESUG Innovation (meta-model based) Technology Awards 2004 Changed development from VisualWorks to Squeak Extracted 1st commercial SqueakMap Magritte Magritte Application release 2005 Changed product name from SmallWiki to Pier Magritte: Meta-Described Web Application Development 2006 3rd price in ESUG Innovation seaside.st Technology Awards 2007 Magritte: A Meta-Driven Approach to Empower Developers and End Users Magritte on WikiPedia 2008
  • 20.
  • 21.
  • 23.
  • 24.
  • 25. Magritte Implementation Details Describe once, Get everywhere
  • 26. Descriptions ! Problem – Objects and their values all need to be treated differently. ! Example – Boolean and String are not polymorphic, therefore different code for certain operations is necessary. ! Solution – Introduce a descriptive hierarchy that can be instantiated, configured and composed.
  • 27. Type Object Component Component Type 1 * 1 1 (a) Type-Square * * Property Property Type 1 * Type Object [Yoder et al, 2001] Architecture and design of adaptive object models
  • 28. attributes attributes 1 1 * attributes * 1 Object * Object * * Object * description description Object Object Type Type description Object Type attributes Description * Description * * 1 Description [Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users *
  • 29. attributes attributes 1 1 * attributes * 1 Object * Object * * Object * description description Object Object Type Type description Object Type attributes Description * Description * * 1 Description [Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users *
  • 30. attributes attributes 1 1 * attributes * 1 Object * Object * * Object * description description Object Object Type Type description Object Type attributes Description * Description * * 1 Description [Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users *
  • 31. Descriptions Composite pattern to describe model-instances. Accessor Description Condition children Container ElementDesc. StringDesc. BooleanDesc.
  • 32. Descriptions reference Description children Container ElementDesc. ColorDesc. MagnitudeDesc. StringDesc. BooleanDesc. ReferenceDesc. DateDesc. NumberDesc. OptionDesc. RelationDesc. SingleDesc. MultipleDesc. ToOneDesc. ToManyDesc.
  • 33. Accessors ! Problem – Data can be stored and accessed in different ways. ! Examples – Accessor methods, chains of accessor methods, instance-variables, dictionaries, derived values, external values, etc. ! Solution – Provide a strategy pattern to be able to access data through a common interface.
  • 34. Accessors Strategy pattern to access model-entities. next, accessor Accessor Cascade Selector Dictionary Block Null Auto
  • 35. o: Object d: Description a: Accessor readUsing: d accessor read: o <strategy a> write: v using: d accessor write: v to: o <strategy a>
  • 36. Mementos ! Problems – Editing might turn a model (temporarily) invalid. – Canceling an edit shouldn’t change the model. – Concurrent edits of the same model should be detected and (manually) merged. ! Solution – Introduce mementos that behave like the original model and that delay modifications until they are committed.
  • 37. Mementos Memento pattern to cache model-entities. description model Description Memento Object cache Strait Cached Dictionary original Checked Dictionary
  • 40. Adaptive Model + copy() descriptions values Object Description
  • 41. End users would know their requirements
  • 42. attributes attributes 1 1 * attributes * 1 Object * Object * * Object * description description Object Object Type Type description Object Type attributes Description * Description * * 1 Description [Renggli et al, 2007] Magritte — A Meta-Driven Approach to Empower Developers and End Users *
  • 43. Meta- Metamodel <described-by> Metamodel Developer <described-by> Domain Model End User
  • 44. Meta- Metamodel <described-by> Metamodel Magritte Developer <described-by> Domain Model Magritte End User
  • 45. Demo
  • 46. Conclusion ! Describe once, get everywhere. ! Ensure extensibility and maintainability. ! Automate repetitive tasks. ! End-user customizability. ! (Run-time) adaptive object model.