[Seaside-dev] Re: Altitude

Julian Fitzell julian at fitzell.ca
Thu Nov 6 10:03:16 UTC 2008


On Thu, Nov 6, 2008 at 10:46 AM, Avi Bryant <avi at dabbledb.com> wrote:
> On Thu, Nov 6, 2008 at 1:44 AM, Avi Bryant <avi at dabbledb.com> wrote:
>
>>> On the other hand, RequestFilters are so useful, it's hard to believe
>>> that ComponentFilters aren't as well! :D
>>
>> Well, that was the original logic behind moving to Decorations for
>> that stuff (I think 2.3 had something very like RequestFilter that got
>> used for #isolate: and auth, didn't it?).
>
> (To be more explicit: that was the original logic, but they turned out
> not to be useful, and we're back to global filters...)
>

(Moving this conversation to the seaside-dev list)

Well that's what I was wondering, if your assertion was that component
decorations are only useful for adding buttons and stuff.

For those cases, I agree that you pretty much know you're going to be
decorated. We have, though, for example, WAWindowDecoration which
WAPlugin uses to display any component as a window with a close X in
the top corner. The components don't really need to know they're
wrapped there. In fact, it occurs to me that the WindowDecoration
could actually be a kind of delegation in which case it wouldn't even
need to make the component answer nil, it could just remove itself.

RequestFilters turn out to be useful for all kinds of things like
error handling, modifying cookies, profiling, etc. without the thing
they're wrapping knowing anything about it; lukas even implemented the
session monitor as a filter. It seems like in theory the same level of
flexibility is there with component decorations at the finer-grained
component level. You don't have that opportunity if it's dependent on
people having used the right subclass of Component. (do you have to
have a DecoratableTask as well as a Task then too?).

If nobody is using them for anything interesting, is that because:
  a) it's not documented well enough for them to know how or that they can
  b) it's not implemented well enough to make it useful
  c) there's not enough power at this level (compared to requset
handlers) for it to have any value

Julian


More information about the seaside-dev mailing list