[Seaside] Seaside and REST

Lukas Renggli renggli at gmail.com
Thu May 3 05:05:32 UTC 2007


> 2) a subclass of WARenderLoopMain implementing #start: and possibly
> #createRoot.
>
> (here is some pseudo code for this subclass but I'll send you a
> working example if you want)
>
> start: aRequest
>
>         | path decision |
>         path := aRequest url findTokens: $/.
>
>         decision := path interrogateMe.
>         state := InitialState newBasedOn: decision.
>         super start: aRequest
>
> createRoot
>         | root |
>         root := super createRoot.
>         root initialiseWithState: state.
>         ^ root

Overriding WAComponent>>#initialRequest: can sometimes avoid the extra
subclass of WARenderLoopMain. Moreover the code is the closer to the
counterpart #updateRoot:

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list