Using REST URLs in a seaside app

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using REST URLs in a seaside app

Adrian Schmitt-2
Hi,

I am going to do a blog-like application with picture upload, and comments.

I would like to do it ins seaside. But it should have REST URLs for
the articles and everything that is visible to public and
google-indexable or bookmarkable.

This somehow contradicts the seaside way with URLs like
http://example.com?_k=SnHcqUzW&_s=dopnYUdWppKFRzBl

The first thing would be to create rest-urls for the links, which
should not be such a problem:

http://example.com/blog/2007/09/interesting-post.html
or
http://example.com/blog/2007/09/comment_xyz.html

The second would be to serve the page with the right content displayed
depending on the url.Without using k and s parameters.

So there would not be any k and s parameters for the "public" content.
But as soon as someone logs in or writes a comment they should be
used. So I have a public part that does not use the sessions and a non
public part that does. In the public part each session could expire or
end after the page is delivered.

Sounds complicated. Did anyone do something like this or is there a
better approach?

Thank you for any ideas
Adrian
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using REST URLs in a seaside app

Lukas Renggli
> I am going to do a blog-like application with picture upload, and comments.
>
> I would like to do it ins seaside. But it should have REST URLs for
> the articles and everything that is visible to public and
> google-indexable or bookmarkable.

All this is done in Pier: the Blog, the google-indexability and the
bookmarkability.

> The second would be to serve the page with the right content displayed
> depending on the url.Without using k and s parameters.

Getting rid of _s is easy, you use cookies.


> So there would not be any k and s parameters for the "public" content.
> But as soon as someone logs in or writes a comment they should be
> used. So I have a public part that does not use the sessions and a non
> public part that does. In the public part each session could expire or
> end after the page is delivered.

Getting rid of _k is possible, but not that easy. It involves some
hacking in a subclass of WASession. The commercial www.cmsbox.ch does
this for example.

> Sounds complicated. Did anyone do something like this or is there a
> better approach?

The better approach in my opinion is not to worry about these
parameters. At least not in the beginning.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using REST URLs in a seaside app

Adrian Schmitt-2
2007/9/28, Lukas Renggli <[hidden email]>:
> All this is done in Pier: the Blog, the google-indexability and the
> bookmarkability.
> ...
> The better approach in my opinion is not to worry about these
> parameters. At least not in the beginning.

Thank you very much. I will install pier and learn from it.

Adrian
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Using REST URLs in a seaside app

sop soptwo
In reply to this post by Lukas Renggli

Hi, I'm trying to remove the _s and k part from the url too. As Lukas said, with cookies, removeing the _s part was easy.
But I can't remove the _k. Lukas said it's possible with WASession, but I don't know how.

Can someone explain me, please ?

Thanks

Sebastien
_________________________________________________________________
Vous êtes plutôt Desperate ou LOST ? Personnalisez votre PC avec votre série TV préférée !
http://specials.divertissements.fr.msn.com/SeriesTV.aspx_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Using REST URLs in a seaside app

Ramon Leon-5
> Hi, I'm trying to remove the _s and k part from the url too.
> As Lukas said, with cookies, removeing the _s part was easy.
> But I can't remove the _k. Lukas said it's possible with
> WASession, but I don't know how.
>
> Can someone explain me, please ?
>
> Thanks
>
> Sebastien

Take a look at #performRequest: to see how a session maps the _k to a
continuation, and #actionUrlForKey: or #actionUrlForContinuation.  You're
going to have to take control of url generation and ensure they're mapped
properly when a request is handled.  I've never done this, but this is where
I'd start looking if I needed to.

Ramon Leon
http://onsmalltalk.com 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside