[Zope3-dev] Context and Component Lookup
Phillip J. Eby
pje@telecommunity.com
Wed, 06 Aug 2003 11:36:36 -0400
At 10:19 AM 8/6/03 -0400, Jim Fulton wrote:
>The existing context objects have a similar role in Zope 3 today.
>They are very explicit, but, they are *too* explicit. Way too much
>code has to be aware of them. It doesn't get too bad until the *content*
>needs to get to them. Having a wrapper around doesn't help unless the
>content's
>methods are either bound to the context or passed the context. Both have been
>found to be a huge burden. This burden is tha main motivation for the
>current "container geddon". in which I'm looking at using explicit container
>references for context-aware content.
I guess the part that confuses me here, is that code that's getting views
is presumably view code, so why is it a problem for view code to keep track
of a context? It seems to me that by definition only view code should be
looking up views. Conversely, for anything that's not presentation-based,
shouldn't a component use its containment context for lookups? To do
otherwise would seem to me to negate the whole point of containergeddon:
that content components have a fixed containment context.