[aida] Comment on the tutorial

Janko Mivšek janko.mivsek at eranova.si
Mon Sep 22 22:58:35 CEST 2008


Stephen Davies wrote:

>      > (It does seem wrong to me that the view for adding an address is
>     in the AddressBook model, but I leave that to another post).
> 
>     No! View methods are always in the applications. The model doesn't deal
>     with view and action methods.
> 
> 
> 
> Sorry - I made a mistake in my comment and so my objection wasn't clear.
> 
> The tutorial tells you to create a viewAdd method to the 
> ADemoAddressBookApp class.  I understand that it is on the "App" class - 
> that's the "View" in my understanding of MVC.
> 
> But the viewAdd method has to know all about the insides of an 
> "ADemoAddress".  So its in the wrong place.  The code that knows what's 
> inside an ADemoAddress should ideally be in the ADemoAddress class, not 
> so?  Or, maybe the ADemoAddressApp.
> 
> Actually, the same objection stands for the viewMain method in 
> ADemoAddressBookApp, which knows the names of the "columns" (instance 
> variables) of the ADemoAddress.
> 
> Am I picking nits?  

You were confused by that missing addLinkTo: self observee. After that 
MVC separation is again as you expected. self observee namely provides 
that link between VC and M part of MVC. That way model stays responsible 
for his part of job while an App (VC) is responsible for web 
presentation of domain object (self observee).

Janko


-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list