[Seaside] Adding 'test' to application list.

Keith P. Hodges keith.hodges at cheerful.com
Sat Jun 14 22:34:09 CEST 2003


>On Sat, 14 Jun 2003, Keith P. Hodges wrote:
>
>>  2. By default [WAControllerSession>>createRootFromRequest:] route
>>  requests to class methods on the component.
>>
>>  so request  path /seaside/mycomponent/test instanciates
>>
>>  WAMyComponent newTest.
>
>Hm, that's interesting.  What if you could simply choose the selector used
>to create the entry points, as a preference?  So, if you were setting up
>the app in the class side #initialize method, you would have
>
>FooComponent class>>initialize
>
>   self registerAsApplication: 'footest1' createWith: #test1.
>   self registerAsApplication: 'footest2' createWith: #test2.
>
>I'm more inclined to be explicit about it, then to try to add too many
>magic URL conventions.
>
>Avi

Avi,

I thought you would see things that way :-)

I was thinking along the lines of pushing forward a standard scheme 
for testing components to give the "testing is a priority" philosophy 
some substance. i.e. have links as an integral part of the ToolBar 
and ApplicationList that invoke a component in different test 
configurations.

Thinking about it I see my scheme as the logical implicit case! It is 
effectively the equivalent of hitting a website file directory, e.g. 
http://host/"user/info.html, in which the specialised case is 
http://host/"user loads http://host/~user/index.html or in seaside 
terms http://host/seaside/app/this  invoking WAComponent-c-newThis is 
the default behaviour and http://host/seaside/app is the special case 
behaviour invoking WAComponent-c-new.

I am finding the need to test a component while running "under" 
different Session classes, and with different preferences to be a bit 
tricky.

any ideas?

Keith


More information about the Seaside mailing list