[Seaside] REST-ful urls
John Thornborrow
john at pinesoft.co.uk
Tue Jun 5 11:16:57 UTC 2007
Correction to my previous message, the method is:
WASessionConfiguration>>>useSessionCookie
John
www.pinesoft.co.uk
John Thornborrow wrote:
> I have stumbled upon a similar problem after I have changed sessions to
> use cookies (i.e. WASessionConfiguration>>>useSessions returns true)
>
> The same symptoms are occuring; the user can enter the /blog url and it
> will display the blog, but the url will revert. Does anyone know the cause?
>
> Many thanks,
>
> John
>
> www.pinesoft.co.uk
>
> John Thornborrow wrote:
>
>> Lukas Renggli wrote:
>>
>>
>>>> The #controller returns an instance of my own-made controller class.
>>>>
>>>>
>>> What is a controller class? A component?
>>>
>>>
>> No, it is my implementation of a Controller (pattern) which interprets
>> the URL and returns the relevant component for rendering. It doesn't do
>> anything else.
>>
>>
>>>> This class returns (via #answer:) an instance of the subcomponent
>>>> to be rendered.
>>>>
>>>>
>>> You seem to use #call: and #answer: where you should use plain
>>> Smalltalk message send and return. Even-tough #call: and #answer:
>>> mimic the Smalltalk send/return, it has completely different
>>> semantics. Unless you want to display a component and return an answer
>>> from an end-user interaction, never use #call: and #answer:.
>>>
>>> Why not write something along:
>>>
>>> controller := PineSoftWebController new uri: url.
>>> self registry at: 'content' put: controller currentComponent
>>>
>>>
>>>
>> That is what I have now done, you are correct that I was using
>> #call:/#answer: unnecessarily.
>>
>>
>>>> I did not know it broke initialisation! I thought that would only happen
>>>> if I called #isolate: like so:
>>>>
>>>> ---
>>>> self isolate: [
>>>> self call: controller]
>>>>
>>>>
>>> #isolate: is to control the use of the back-button in a control flow,
>>> where multiple components are displayed in sequenze. You find in-depth
>>> explanation about the semantics and the use of #call:, #answer: and
>>> #isolate in "Seaside – A Multiple Control Flow Web Application
>>> Framework" [1]
>>>
>>> Lukas
>>>
>>> [1] http://www.iam.unibe.ch/~scg/Archive/Papers/Duca04eSeaside.pdf
>>>
>>>
>>>
>> Thanks, I shall have a read.
>>
>> John
>>
>> www.pinesoft.co.uk
>>
>>
>> Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
>>
>>
>>
>> This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
>>
>> _______________________________________________
>> 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
>
>
>
>
>
More information about the Seaside
mailing list