[Seaside] seaside and rest
estebanlm at gmail.com
Tue Mar 29 11:15:04 UTC 2011
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 |
"HERE I WANT TO SHOW MY COMPONENT"
index := MyIndex new.
self requestContext respond: [:response |
contentType: WAMimeType textHtml;
nextPutAll: ( WARenderCanvas builder
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 :)
El 29/03/2011, a las 4:56a.m., Olivier Auverlot escribió:
> 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 ;-)
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside