23rd, March 2000 
 
 
  
David facilitating a UI Design Session
This is the letters to the editor section. A collection of e-mail correspondence updated periodically.
Letters Index
Modal vs A-Modal
How is the big question
Wiley website review
Intelligence Advantage
Use Cases
Mediator Pattern
Visual Proxy
Mediator Pattern

Ian Horrocks wrote...

Hi David,

I have read some very confusing stuff on MVC myself. I didn't mention MVC in my book because I had read too many conflicting things to be certain of what was right and what was wrong. I am now confident I have got to the bottom of it all. Separating the view and controller is very much a Smalltalk thing. In Java, the Views and Controllers are combined. You may have used the Observer interface and Observable class, if you haven't then here is a quick overview ...

Suppose you had two different views in your application - for example, a layout editor and a property sheet in a development tool such as VB. Both these are Observers and these are registered with an underlying model which extends the Observable class. When the model is updated, it can be made to call the update() method of the Observers that are registered with it. The Observers can then decide how to react to the event. As you can see, the view and controller are combined into an object that implements the Observer interface and the model is the class that extends the Observable class.

In the approach I have used in my book, I have used controller objects to coordinate user interface objects. This is in fact the Mediator pattern (Gamma et al). So the controllers in my book could be more acurately described as Mediators, rather than controllers.

Ian

Feedbackdavid@uidesign.net

      
 
Copyright uidesign.net, 1999 - 2000