SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
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.

Mais conteúdo relacionado

Destaque (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í
 

Mais 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
 

Mais 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

📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call Girls📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call GirlsNitya salvi
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableCall Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableNitya salvi
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna... Shivani Pandey
 
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.Nitya salvi
 
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...rajveermohali2022
 
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...hotbabesbook
 
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With... Shivani Pandey
 
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna... Shivani Pandey
 
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment BookingKanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...ritikasharma
 
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyNitya salvi
 
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls ServiceCollege Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls ServiceNitya salvi
 
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.Nitya salvi
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...HyderabadDolls
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser... Shivani Pandey
 
📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call GirlsNitya salvi
 
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...Nitya salvi
 

Último (20)

📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call Girls📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call Girls
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableCall Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
 
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
 
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
 
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...
Zirakpur Call Girls👧 Book Now📱8146719683 📞👉Mohali Call Girl Service No Advanc...
 
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...
Mira Road | Call Girls Service Mumbai | ₹,9500 Pay Cash 9833325238 Free Home ...
 
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
 
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
 
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment BookingKanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
 
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
 
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls ServiceCollege Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
 
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
 
📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls
 
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
 

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.