[Seaside] Providing REST api

Philippe Marschall philippe.marschall at gmail.com
Tue Dec 28 16:45:12 UTC 2010


2010/12/28 Philippe Marschall <philippe.marschall at gmail.com>:
> 2010/12/28 Sebastian Sastre <sebastian at flowingconcept.com>:
>> Yeah, I've also questioned that it wouldn't be REST.
>> But... so what?
>> What matters is to get the thing done. You can make the app seem REST
>> (accidentally) just to make it more familiar to people implementing clients
>> but do the think the way you know you can capitalize best.
>> So, yeah right? you can have those components that render XML (or JSON).
>
> Yeah, just override #rendererClass like RSRSS does.
>
>> And
>> that idea about preventing the redirect, I like that.
>
> Just subclass WAActionPhaseContinuation and change #shouldRedirect to
> answer false. You probably also need a custom
> WARenderPhaseContinuation that does not create an HtmlRoot
>
>> Given the chance it will be fun to play with this
>
> The trickiest part is probably the action URLs and callbacks. You can
> certainly make it work but it might require some ugly copy/paste code.
> I might have time to hack something xml-based together.

Seaside-WebServices-Core and Seaside-Tests-WebServices from [1]. There
is WASampleXmlComponent in the tests that demonstrates #call:,
#answer: and callbacks. It's a bit clunky has no client but works.

 [1] http://www.squeaksource.com/Seaside30Addons

Cheers
Philippe


More information about the seaside mailing list