Object Arts.com




“Twisting the Triad”
The evolution of the Dolphin
 Smalltalk MVP framework
           Andy Bower
     ...
Object Arts.com



            Some History…
•  1984 - Intuitive Solution
•  1988 - Intuitive Solution/2
•  1995 - Intuiti...
Object Arts.com



Intuitive Solution
Object Arts.com



            Intuitive Solution/3
•    Windows client
•    Pure Object Oriented
•    Memory footprint su...
Object Arts.com


Dolphin Smalltalk
Object Arts.com



Learning from our mistakes?
                                       PROCESS FOR dayBookEntry
           ...
Object Arts.com



                  “Widgets” - 1
•  Dolphin UI should be widget based
   –  Precedents were...
      •  ...
Object Arts.com



                “Widgets” - 2
•  Easy to draw UI first and code later
•  But poor re-use…

  e.g. Small...
Object Arts.com



Model-View-Controller

         dependency
 Model                View




                      Control...
Object Arts.com



                      Basic MVC
•  Model is a domain object
   –  Refined into ValueModel
•  View is an...
Object Arts.com



Enhanced MVC
Object Arts.com



                 MVC - 2
•  Application Model
  –  Mediator between domain classes and UI
•  M,V,C are ...
Object Arts.com



            MVC Anomalies
•  Observcr pattern applied in wrong place
  –  AM and View are loosely coupl...
Object Arts.com



Model-View-Presenter
Object Arts.com



      Presenters as components
•  MVP components based around presenter
   –  Hierarchical
•  Views are...
Object Arts.com



                Resources
•  Models (domain logic) are class based
•  Presenters (UI logic) are class b...
Object Arts.com



        Dependency vs Events
•  Dependency
  –  legacy Observer mechanism from ST-80
  –  register inte...
Object Arts.com



        Does Dolphin have “Balls”?
•    Visual Basic had VBX
•    COM has ActiveX
•    Java has Beans
•...
Object Arts.com



                MVP in a Nutshell
•  Models first / UI second
•  Model is mutable or immutable?
    –  ...
Object Arts.com



Web components
Object Arts.com



          MVP Potential (1)
•  Schematics
Object Arts.com



          MVP Potential (2)
•  Portable Smalltalk UI
  –  Models and Presenters are already ANSI
     p...
Object Arts.com



               Summary
•  MVP is modern Observer style framework
•  Keeps advantages of MVC without
   ...
Upcoming SlideShare
Loading in …5
×

Twisting the Triad

1,054
-1

Published on

Twisting the Triad -- The evolution of the Dolphin Smalltalk MVP Framework.

Andy Bower, ESUG 2000

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,054
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Twisting the Triad

  1. 1. Object Arts.com “Twisting the Triad” The evolution of the Dolphin Smalltalk MVP framework Andy Bower Blair McGlashan Object Arts Ltd.
  2. 2. Object Arts.com Some History… •  1984 - Intuitive Solution •  1988 - Intuitive Solution/2 •  1995 - Intuitive Solution/3
  3. 3. Object Arts.com Intuitive Solution
  4. 4. Object Arts.com Intuitive Solution/3 •  Windows client •  Pure Object Oriented •  Memory footprint suitable for laptops •  Relational Database connectivity •  Component-based GUI
  5. 5. Object Arts.com Dolphin Smalltalk
  6. 6. Object Arts.com Learning from our mistakes? PROCESS FOR dayBookEntry … ... ENDPROCESS PROCESS FOR Update … … ENDPROCESS Intuitive Solution employed a widget based framework
  7. 7. Object Arts.com “Widgets” - 1 •  Dolphin UI should be widget based –  Precedents were... •  Visual Basic/Windows Dialogs/MFC –  Typically not hierarchical •  Widgets –  UI components where data/display/behaviour are combined in a single entity. –  #createLayout method to construct composite UI –  Events routed via individual methods
  8. 8. Object Arts.com “Widgets” - 2 •  Easy to draw UI first and code later •  But poor re-use… e.g. SmalltalkWorkspace
  9. 9. Object Arts.com Model-View-Controller dependency Model View Controller
  10. 10. Object Arts.com Basic MVC •  Model is a domain object –  Refined into ValueModel •  View is an output device –  Linked by Observer to display model contents •  Controller is an input device –  Maps UI gestures into changes to model •  MVC gives a pluggable widget –  Usually a generic value component –  Not suitable for composite “application” components
  11. 11. Object Arts.com Enhanced MVC
  12. 12. Object Arts.com MVC - 2 •  Application Model –  Mediator between domain classes and UI •  M,V,C are all pluggable –  Much improved reuse cf Widgets
  13. 13. Object Arts.com MVC Anomalies •  Observcr pattern applied in wrong place –  AM and View are loosely coupled –  Leads to #componentAt: problem –  in turn breaks Observer •  Controllers –  inappropriate for modern event driven OS
  14. 14. Object Arts.com Model-View-Presenter
  15. 15. Object Arts.com Presenters as components •  MVP components based around presenter –  Hierarchical •  Views are the presenters’ “skins” –  Hierarchical, but independent of presenter hierarchy –  Multiple views available for each presenter •  Models are the presenters’ data –  Initially owned by presenter –  Can be reattached
  16. 16. Object Arts.com Resources •  Models (domain logic) are class based •  Presenters (UI logic) are class based •  Views are often instance based –  Composite views built with View Composer –  Saved down as resources
  17. 17. Object Arts.com Dependency vs Events •  Dependency –  legacy Observer mechanism from ST-80 –  register interest in all updates –  explicit disconnect via #release •  Events (SASE) –  introduced in Digitalk ST –  #when:send:to: –  target specific events –  finalization can automatically disconnect
  18. 18. Object Arts.com Does Dolphin have “Balls”? •  Visual Basic had VBX •  COM has ActiveX •  Java has Beans •  Dolphin has.. –  Published Aspects –  Instance streaming I think so!
  19. 19. Object Arts.com MVP in a Nutshell •  Models first / UI second •  Model is mutable or immutable? –  Immutable models require value components •  Basic Component –  implement view class –  implement presenter class –  install view instance as a named resource on presenter •  Composite component –  implement presenter class –  draw composite view with View Composer –  install view as a named resource on presenter
  20. 20. Object Arts.com Web components
  21. 21. Object Arts.com MVP Potential (1) •  Schematics
  22. 22. Object Arts.com MVP Potential (2) •  Portable Smalltalk UI –  Models and Presenters are already ANSI portable –  Require views for target platform –  Useful for Camp Smalltalk/ Refactoring Browser
  23. 23. Object Arts.com Summary •  MVP is modern Observer style framework •  Keeps advantages of MVC without disadvantages •  More suitable for event driven OS Spread the Word!

×