[Seaside] Naming URLs - three questions

Roger Whitney whitney at cs.sdsu.edu
Thu Jan 27 23:05:34 CET 2005


On Jan 27, 2005, at 3:41 AM, Avi Bryant wrote:
>
>> Q2. The point of creating the subclass of WAMain seems to be to allow 
>> a
>> way pass request information to a session, allowing for bookmarkable
>> pages. So one might be able to have a url like
>> http://universe.com/seasideApp?product='spaceship' work with a seaside
>> app. Now I have to create new class, a subclass of WAMain, and usually
>> add just one method start: and modify the application settings. This
>> start: method just creates a new component and passes it information.
>> Why not just add a hook method to WAComponent that is called when
>> WAMain creates the component? It would make it easier on the
>> application developer.
>
Avi,
	Initially I was just thinking of a method like  
#initializeFromRequest: on component, but realized that at times one 
might need to send it to all the components in a tree. At that point I 
had to get ready for class. It seems like sending it to all components 
would be better, however so far I have only needed it in the top level 
component.

> Excellent question.  I think there will still be some cases where a
> subclass of Main is needed - if, for example, you wish to return a
> static response for certain URLs (like the RSS feed in SmallBlog).
> However, if it's just initialization data, you're right that the
> component can probably handle it.  Do you have a suggestion for an
> interface for this?  Perhaps #initializeFromRequest: on Component?  Or
> #takeValuesFromInitialRequest:?  Should that just be sent to the top
> level component, or should we walk the tree (that seems better, since
> you could then have an embedded component that wanted info from the
> request and the root component would be oblivious to this).

----
Roger Whitney              Department of Computer Science
whitney at cs.sdsu.edu        San Diego State University
http://www.eli.sdsu.edu/   San Diego, CA 92182-7720
(619) 583-1978
(619) 594-3535 (office)
(619) 594-6746 (fax)



More information about the Seaside mailing list