SlideShare uma empresa Scribd logo
1 de 23
Object Arts.com




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



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



Intuitive Solution
Object Arts.com



            Intuitive Solution/3
•    Windows client
•    Pure Object Oriented
•    Memory footprint suitable for laptops
•    Relational Database connectivity
•    Component-based GUI
Object Arts.com


Dolphin Smalltalk
Object Arts.com



Learning from our mistakes?
                                       PROCESS FOR dayBookEntry
                                       …
                                       ...
                                       ENDPROCESS




                      PROCESS FOR Update
                      …
                      …
                      ENDPROCESS

Intuitive Solution employed a widget based framework
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
Object Arts.com



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

  e.g. SmalltalkWorkspace
Object Arts.com



Model-View-Controller

         dependency
 Model                View




                      Controller
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
Object Arts.com



Enhanced MVC
Object Arts.com



                 MVC - 2
•  Application Model
  –  Mediator between domain classes and UI
•  M,V,C are all pluggable
  –  Much improved reuse cf Widgets
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
Object Arts.com



Model-View-Presenter
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
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
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
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!
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
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
     portable
  –  Require views for target platform
  –  Useful for Camp Smalltalk/ Refactoring
     Browser
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!

Mais conteúdo relacionado

Mais procurados

Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Adam Mokan
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applicationsIvano Malavolta
 
Distributed and Collaborative Visualization
Distributed and Collaborative VisualizationDistributed and Collaborative Visualization
Distributed and Collaborative VisualizationAmir Masoud Abdol
 
Leveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup projectLeveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup projectThomas Jaskula
 
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum)
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum) iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum)
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum) Infinum
 

Mais procurados (6)

Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Android application development
Android application developmentAndroid application development
Android application development
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
Distributed and Collaborative Visualization
Distributed and Collaborative VisualizationDistributed and Collaborative Visualization
Distributed and Collaborative Visualization
 
Leveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup projectLeveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup project
 
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum)
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum) iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum)
iOS Zagreb Meetup #02 - Folding animations with Origami (Filip Beć @ Infinum)
 

Destaque

Squeak by Example - Fosdem08
Squeak by Example - Fosdem08Squeak by Example - Fosdem08
Squeak by Example - Fosdem08Damien Pollet
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET WorldESUG
 
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio LauncherDevelopment and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio LauncherESUG
 

Destaque (7)

Squeak by Example - Fosdem08
Squeak by Example - Fosdem08Squeak by Example - Fosdem08
Squeak by Example - Fosdem08
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET World
 
Opal compiler
Opal compilerOpal compiler
Opal compiler
 
Squeak
SqueakSqueak
Squeak
 
Smalltalk on rubinius
Smalltalk on rubiniusSmalltalk on rubinius
Smalltalk on rubinius
 
Swt 2009
Swt 2009Swt 2009
Swt 2009
 
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio LauncherDevelopment and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
 

Semelhante a Twisting the Triad

.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid DoesKevin McMahon
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIMarcin Grzywaczewski
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerSencha
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellEugene Fedorenko
 
Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)Chris Chedgey
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Jeremy Likness
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
New Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceNew Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceCorrelsense
 
Large-Scale Web Development with JavaScript
Large-Scale Web Development with JavaScriptLarge-Scale Web Development with JavaScript
Large-Scale Web Development with JavaScriptNavid Ahmadi
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
 
Building HMI with VB Tutorial [1998]
Building HMI with VB Tutorial [1998]Building HMI with VB Tutorial [1998]
Building HMI with VB Tutorial [1998]Sarod Paichayonrittha
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBrian Lyttle
 
Salesforce lwc development workshops session #2
Salesforce lwc development workshops  session #2Salesforce lwc development workshops  session #2
Salesforce lwc development workshops session #2Rahul Gawale
 

Semelhante a Twisting the Triad (20)

.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid Does
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext Designer
 
EMF Scaffolding
EMF ScaffoldingEMF Scaffolding
EMF Scaffolding
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Rvrsit
RvrsitRvrsit
Rvrsit
 
Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
New Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceNew Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System Performance
 
Large-Scale Web Development with JavaScript
Large-Scale Web Development with JavaScriptLarge-Scale Web Development with JavaScript
Large-Scale Web Development with JavaScript
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
Building HMI with VB Tutorial [1998]
Building HMI with VB Tutorial [1998]Building HMI with VB Tutorial [1998]
Building HMI with VB Tutorial [1998]
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on Azure
 
Salesforce lwc development workshops session #2
Salesforce lwc development workshops  session #2Salesforce lwc development workshops  session #2
Salesforce lwc development workshops session #2
 

Mais de ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

Mais de ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Twisting the Triad

  • 1. Object Arts.com “Twisting the Triad” The evolution of the Dolphin Smalltalk MVP framework Andy Bower Blair McGlashan Object Arts Ltd.
  • 2. Object Arts.com Some History… •  1984 - Intuitive Solution •  1988 - Intuitive Solution/2 •  1995 - Intuitive Solution/3
  • 4. Object Arts.com Intuitive Solution/3 •  Windows client •  Pure Object Oriented •  Memory footprint suitable for laptops •  Relational Database connectivity •  Component-based GUI
  • 6. Object Arts.com Learning from our mistakes? PROCESS FOR dayBookEntry … ... ENDPROCESS PROCESS FOR Update … … ENDPROCESS Intuitive Solution employed a widget based framework
  • 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. Object Arts.com “Widgets” - 2 •  Easy to draw UI first and code later •  But poor re-use… e.g. SmalltalkWorkspace
  • 9. Object Arts.com Model-View-Controller dependency Model View Controller
  • 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
  • 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. 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
  • 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. 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. 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. 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. 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
  • 21. Object Arts.com MVP Potential (1) •  Schematics
  • 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. 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!