Hi,
I try desperately to use seaside-Rest for building REST services with Seaside. I read the documentation (http://code.google.com/p/seaside/wiki/SeasideRest) and read this post on the ML (http://lists.squeakfoundation.org/pipermail/seaside-dev/2009-September/003584.html). Someone could explain me how to use this library ? Must I create an Seaside application for hosting the web service ? What is the content of the createRoutes method ? What is the goal of the life ? 42 ? I feel that i become crazy... <X Thanks for your help. best regards Olivier ;-) www.auverlot.fr _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Oliver,
I also had a hard time to use it... what I did is to study bibliocello and squeaksource3 packages (both at seaside.gemstone.com/ss) One interesting thing I found, is that you normally will want do something like this: index | index | <GET> <Path: '/index'> "HERE I WANT TO SHOW MY COMPONENT" index := MyIndex new. self requestContext respond: [:response |
response
contentType: WAMimeType textHtml;
nextPutAll: ( WARenderCanvas builder
fullDocument: true;
rootBlock: [ :root | index updateRoot:root ];
render: [ :canvas | index renderContentOn: canvas ])]. This is the "common answer pattern" I found. Of course, this is just an example, and IRL you'll want to place the response login in a separate method, probable extending WAComponent with a method #respondRendered of something (both bibliocello and squeaksource3 uses this approach). I hope this helps :) cheers, Esteban El 29/03/2011, a las 4:56a.m., Olivier Auverlot escribió:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Olivier Auverlot
Hi again :)
I forget that, before all, you need to register your application with something like this: | app | app := WAAdmin register: self asApplicationAt: 'myapp'. app addFilterFirst: MyRestFilter new. (you need to add YOUR Rest filter, who is a child of WAPragmaBasedRestfulFilter) cheers, Esteban pd: Philippe, any chance this information can be placed somewhere in the wiki, I think for us, the newcomers to SeasideRest is not so easy to understand :( El 29/03/2011, a las 4:56a.m., Olivier Auverlot escribió:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Esteban, Thanks for this informations. I will continue my tests. Hi again :)+1000. More documentation are welcome. It's now very important to have the possibilite produce web services with Seaside. Olivier ;-) www.auverlot.fr
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by EstebanLM
2011/3/29 Esteban Lorenzano <[hidden email]>:
> Hi again :) > I forget that, before all, you need to register your application with > something like this: > | app | > app := WAAdmin register: self asApplicationAt: 'myapp'. > app addFilterFirst: MyRestFilter new. > (you need to add YOUR Rest filter, who is a child of > WAPragmaBasedRestfulFilter) > cheers, > Esteban > pd: Philippe, any chance this information can be placed somewhere in the > wiki, I think for us, the newcomers to SeasideRest is not so easy to > understand :( Done Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
This is cool, let's add it at some point to the Seaside Book too :-)
On 29 March 2011 20:20, Philippe Marschall <[hidden email]> wrote: > 2011/3/29 Esteban Lorenzano <[hidden email]>: >> Hi again :) >> I forget that, before all, you need to register your application with >> something like this: >> | app | >> app := WAAdmin register: self asApplicationAt: 'myapp'. >> app addFilterFirst: MyRestFilter new. >> (you need to add YOUR Rest filter, who is a child of >> WAPragmaBasedRestfulFilter) >> cheers, >> Esteban >> pd: Philippe, any chance this information can be placed somewhere in the >> wiki, I think for us, the newcomers to SeasideRest is not so easy to >> understand :( > > Done > > Cheers > Philippe > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
2011/3/29 Esteban Lorenzano [hidden email]:Hi again :) I forget that, before all, you need to register your application with something like this: | app | app := WAAdmin register: self asApplicationAt: 'myapp'. app addFilterFirst: MyRestFilter new. (you need to add YOUR Rest filter, who is a child of WAPragmaBasedRestfulFilter) cheers, Esteban pd: Philippe, any chance this information can be placed somewhere in the wiki, I think for us, the newcomers to SeasideRest is not so easy to understand :(Done Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |