Grok component reuse in the Zope 3 world (was Re: [Grok-dev] Re:
gary at zope.com
Sat May 5 21:24:17 EDT 2007
On May 5, 2007, at 5:43 AM, Lennart Regebro wrote:
> On 5/4/07, Gary Poster <gary at zope.com> wrote:
>> There actually was a reason why we wanted something like zcml--
>> something *not* in the Python file. The reason was that we wanted to
>> make it possible to reuse Python without being forced to reuse
>> configuration. We wanted components.
> You mean that because the connection together of the components are in
> zcml, you can use a module outside of zope, because the connections
> will be ignored since they are in a separate file that will be
> (Just trying to understand exactly what you are saying here).
replace "outside of zope" with something like "outside of the current
expected usage" (i.e., I'm making your statement more general so it
can be "outside of the zc, or lovely, or schooltool, or XXX projects
that created it" and so on) then, at least on a quick skim, that
sounds about right.
To be clear, the win of zcml, as I'm trying to present it, can be
done without zcml--I gave the example of a separate Python file with
a grok-like approach, for instance, as one of the possible
replacements--but I'm arguing that having it done with Python
alongside the Python of your implementation makes it more likely to
break this win.
Also to be clear, there's obviously a point where the non-grok and
the grok world agree in direction, for instance with the @implementer
and @adapter decorators.
More information about the Grok-dev