[Seaside] Design Pattern For Accessing Model from View/Controller?
Conrad Taylor
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
^model
model
model := anObject
WAComponent subclass: #AddressBook
edit: aPerson
|view|
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.
-Conrad
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
> have
> > read the C. David Shaffer's tutorial, "Interlude: Cleaning up the
> > PersonalInformationView" and I'm just trying to see what the best
> approach
> > for this. Well, thanks in advance.
>
> In general the view components directly reference the model, e.g. from
> an instance variable.
>
> Cheers
> Philippe
>
> > -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
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070829/7c62d9b8/attachment.htm
More information about the seaside
mailing list