[Seaside] REST-ful urls

Lukas Renggli renggli at gmail.com
Mon Jun 4 09:54:17 UTC 2007

> The #controller returns an instance of my own-made controller class.

What is a controller class? A component?

> This class returns (via #answer:) an instance of the subcomponent
> to be rendered.

You seem to use #call: and #answer: where you should use plain
Smalltalk message send and return. Even-tough #call: and #answer:
mimic the Smalltalk send/return, it has completely different
semantics. Unless you want to display a component and return an answer
from an end-user interaction, never use #call: and #answer:.

Why not write something along:

    controller := PineSoftWebController new uri: url.
    self registry at: 'content' put: controller currentComponent

> I did not know it broke initialisation! I thought that would only happen
> if I called #isolate: like so:
> ---
> self isolate: [
>     self call: controller]

#isolate: is to control the use of the back-button in a control flow,
where multiple components are displayed in sequenze. You find in-depth
explanation about the semantics and the use of #call:, #answer: and
#isolate in "Seaside – A Multiple Control Flow Web Application
Framework" [1]


[1] http://www.iam.unibe.ch/~scg/Archive/Papers/Duca04eSeaside.pdf

Lukas Renggli

More information about the Seaside mailing list