[Zope-dev] Re: [Zope] Re: [Warning] Zope 3 component architecture
(CA) not reliably usable for registrations from Python
Dieter Maurer
dieter at handshake.de
Wed Jan 10 16:27:00 EST 2007
Philipp von Weitershausen wrote at 2007-1-10 15:40 +0100:
> ...
>Things changed a bit after Zope 2.8/X3 3.0. Nowadays, the Component
>Architecture doesn't need any setup anymore and you can do registrations
>on import.
Very good!
>I'd still recommend against that.
Why?
> ...
>That's because Five assumes it's responsible for the setup layer. I
>suggest to register components through ZCML. Five will pick up
>configure.zcml in products automatically *after* everything has been set
>up properly.
The registration is necessary for the module *and not* any product.
It might be possible that any product that uses the module
registers for the event -- but it would break modularity
and would be slightly inefficient.
> ...
>I typically find it quite magic when application policy things happen at
>import:
It is not application policy but a module requirement:
*It* must be informed whenever it is used in a different thread.
In Zope, this may be approximated via an information about
the beginning of each request processing.
> ....
>P.S.: I agree with Martijn, the big "warning" is uncalled for. You're
>just trying to fight the semantics of the framework.
That the semantics meanwhile has changed (as you note above) indicates that
is has not really been right.
And fighting against wrong semantics is a good thing :-)
On the other hand, I agree that my fight came late as the current
release already allows what I was looking for.
Apparently, others already fought successfully...
--
Dieter
More information about the Zope-Dev
mailing list