[Zope3-dev] Using parent references rather than context
wrappers to represent containment
Phillip J. Eby
pje at telecommunity.com
Mon Aug 11 13:08:55 EDT 2003
At 08:30 AM 8/11/03 -0400, Jim Fulton wrote:
>I find this unacceptable for component lookup,
>as context awareness should not be a prerequisite for using
>the component architecture.
I thought this too, in PEAK, and originally had a global context, plus an
optional "local" context that was intended for per-thread context. Then I
found that the cost of having to explain to people why things didn't work
as they expected, was a higher overhead than what I was "saving" them by
trying to DWIM a context.
My two cents: trying to push this issue into a DWIM, just steepens the
learning curve, because you still bump into it *later*. I've been finding
it preferable to just treat the issue up front as a requirement, because
the cost to the user is lower than when they have already started trying to
figure out why something didn't work the way they expected. When starting
to learn something, the user is open to learning. But, when they thought
they knew how it worked, and they are surprised, they begin to distrust the
framework and their knowledge of it. After all, what *else* might they
think they understand, but really don't?
I'm not arguing against the current proposal, just commenting on something
that appears to be a direction (DWIM) that has historically led to the
infamous "Zope Zen" learning curve. I think your current proposals don't
have this issue as a major concern, though, since per-request default
global context seems unlikely to bite anyone who hasn't already reached
Zope 3 guru status. Unless, that is, it leads to people ignoring context
issues (because they don't have to think about it), and thus getting bitten
sooner. But I don't feel strongly one way or the other about that, which
is why I'm +1 on the proposal as a reasonable compromise between being
completely explicit and completely implicit.
More information about the Zope3-dev
mailing list