[Seaside] Rendering Component in a WAPragmaBasedRestfulHandler
camillo.bruni at inria.fr
Sun Apr 17 21:53:11 UTC 2011
I somehow solved the problem now by relying on the pragma evaluation of REST.
So I simply use a normal Root component and internally overwrite the initialRequest: method to find the proper handling method with REST. The handling method initializes (lazily) the current view and assigns it to an instvar. In the renderContentOn: I simply forward to the currently active view.
This way is somewhat a compatible transition from a normal seaside application, since you could use the helper methods there as well...
So for my solution the REST functionality should be encapsulated into a single helper object. However I am still figuring out a nice way to forward parts of the url to a subcomponent to avoid many initialization methods on the root component.
On 2011-04-17, at 20:34, Philippe Marschall wrote:
> 2011/4/13 Julian Fitzell <jfitzell at gmail.com>:
>> Oh I see... you're trying to define nice URL entry points that take
>> the user into full sessions/applications? I'm not sure if that's quite
>> what Philippe had in mind with Seaside-REST (though he may correct me
>> on that).
> Well no, but yes :-) Whereas the problem is not about REST it is about
> binding/injecting request attributes which is what Seaside-REST does.
> One thing that Seaside currently does not allow you to do is easily
> build is an application with stateless landing pages and stateful
> components kicking in later. I'm not sure Seaside-REST is the right
> tool for this since it does not do arbitrary injection, it just
> injects into the handlers methods.
> Maybe a better solution would be to build two applications and the
> stateless one forwarding to the sateful one at one point. That still
> leaves the problem of writing the stateless one and initializing the
> stateful one though.
> So something similar to Seaside-REST but different could be the way to go.
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside