[Seaside] Seaside Sessions in a Blog Server

Julian Fitzell jfitzell at gmail.com
Sat Oct 17 21:01:33 UTC 2009


Not really. :)

I know how it would fit in with the architecture, but not how the API
itself should look so I've never done anything with it. Philippe was
playing with a possible RESTful pattern a few months ago after some
discussion on the list: http://www.squeaksource.com/SeasideMVC.html
(looks like it would need updating to work with 3.0a5).

You could do it fairly straightforwardly by implementing your own
RequestHandler but it would be nice if there was a standard framework
that made it a bit easier than that.

Julian

On Sat, Oct 17, 2009 at 12:56 PM, Karsten <karsten at heeg.de> wrote:
> Hi Julian,
>
> is there a demo for RESTful apps in Seaside available?
>
> Kind Regards
> Karsten
>
> Am 17.10.09 18:31, schrieb Julian Fitzell:
>>
>> Hmm... personally, if I was doing a blog, I wouldn't use the
>> RenderLoop at all (or possibly even sessions) until the user logged in
>> to edit the blog. I might also use it when they posted a comment, but
>> not sure. Much better to have it RESTful at that point, I think...
>>
>> If I was going to use sessions and render loop, I'd just keep the
>> sessions around - it seems like a nightmare to figure out what
>> callbacks were supposed to be what once the session is gone. You could
>> add some kind of hidden field to the form so that you knew what kind
>> of submission it was, and then I guess you could look through the
>> request to find appropriate fields. Kind of tacky though...
>>
>> I guess it would be nice to have a mechanism to move sessions out to
>> disk after a certain period; somebody could probably do that...
>>
>> You can also use JavaScript to keep the session alive as long as the
>> user has the page open...
>>
>> Julian
>>
>> On Sat, Oct 17, 2009 at 9:09 AM, Karsten<karsten at heeg.de>  wrote:
>>
>>>
>>> Hi,
>>>
>>> there's this constant example of building a blog server with whatever web
>>> framework. If you try to build a real webserver in Seaside you've got to
>>> handle sessions somewhat properly. If you view a post and have a comment
>>> input field then the session will be started when you open the post.
>>> After
>>> reading through a very lengthly post the session is probably times out.
>>> After writing a lengthly comment it's certainly timed out. If the user
>>> submits the comment after the session is timed out, his comment is lost.
>>>
>>> The easiest way to handle this is to set the session timeout to maybe a
>>> day
>>> or so. However, i'd rather use a short session time to not have tons of
>>> sessions in the image. What would be the right way to handle that kind of
>>> situations? I guess this could be done in initialRequest:, but how do you
>>> figure out which callback-numbers match which input field?
>>>
>>> Kind Regards
>>> Karsten
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Karsten Kusche - Dipl. Inf. - karsten at heeg.de
>>> Georg Heeg eK - Köthen
>>> Handelsregister: Amtsgericht Dortmund A 12812
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>
> --
> Karsten Kusche - Dipl. Inf. - karsten at heeg.de
> Georg Heeg eK - Köthen
> Handelsregister: Amtsgericht Dortmund A 12812
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list