[Seaside] Re: Upgrading to 2.5a-avi.3
avi at beta4.com
Sat Apr 17 10:00:07 CEST 2004
On Apr 17, 2004, at 12:31 AM, Samuel Tardieu wrote:
>>>>>> "Avi" == Avi Bryant <avi at beta4.com> writes:
> Avi> However, I'm considering deprecating #activeComponent, since
> Avi> #visiblePresentersDo: is probably better for most purposes.
> As far as I am concerned, this is the first time I hear about
No doubt. It's new to Seaside 2.5 and I haven't said a word about it
yet. I didn't mean to just toss it out there without an explanation,
it's just that I'm too tired tonight to go into much detail. Here's a
- a Seaside 2.5 UI is a tree of Presenters. Each of these renders
itself using #renderContentOn:. Each of them can have #children.
- There are two kinds of Presenter. One is Component, which we know
from Seaside 2.3. Components can #call: other Components, and #answer:
values back to them. The other kind of Presenter, which is new, is
Decoration. A Component can have any number of Decorations added to
it. The decorations will do some extra rendering (at response time) or
request processing (at callback time) and then pass control on to the
component they are wrapping.
- because a Component may be in the middle of a #call:, and thus
obscured by the called component, not all components in the tree are
visible at all times. Some kinds of decorations (local decorations)
are also obscured by calls, others (global decorations) are not.
- #visiblePresentersDo: iterates through all of the presenters
(decorations and components) that are not currently obscured, starting
at the receiver (its callers or parents won't be included)
- the most common use is to build up a representation of the user's
current "place" in the application. For example, a navigation bar
might iterate through all of the visible presenters and allow each of
them to add action links, so that the navigation dynamically updates as
the user moves through the app.
> I am convinced that the lack of documentation
> (either made by beta4 or by the community) prevents most of us from
> getting the maximum out of Seaside...
I know. The best thing you can probably do to help is to ask whenever
you get a sense that you're missing something - as you just did. Be a
More information about the Seaside