[Seaside] Design Pattern For Accessing Model from View/Controller?
conradwt at gmail.com
Wed Aug 29 08:33:26 UTC 2007
Hi Philipee, thanks for responding to my post. For example, in Shaffer's
tutorial, he did something similar to the following:
WAComponent subclass: #PersonalInformationView
model := anObject
WAComponent subclass: #AddressBook
view := PersonalInformationView new.
view model: aPerson
self call: view.
Thus, I take it that one needs to have accessors on the view if you're
wanting to modify an instance of a model. Now, each renderContentOn:
represents a single view.
On 8/29/07, Philippe Marschall <philippe.marschall at gmail.com> wrote:
> 2007/8/29, Conrad Taylor <conradwt at gmail.com>:
> > Hi, I have created a subclass of WAComponent. Also, I have a class that
> > represents a model and is a subclass of Object. Thus, I was wondering,
> > what's the best way to connect the my model to my component? BTW, I
> > read the C. David Shaffer's tutorial, "Interlude: Cleaning up the
> > PersonalInformationView" and I'm just trying to see what the best
> > for this. Well, thanks in advance.
> In general the view components directly reference the model, e.g. from
> an instance variable.
> > -Conrad
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside