[Zope3-dev] Re: RFC: Reducing the amount of ZCML directives

Tres Seaver tseaver at palladion.com
Tue Feb 14 07:12:50 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lennart Regebro wrote:
> On 2/14/06, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> 
>>  <utility
>>      component=".alias.sydneyFactory"
>>      name="alias.SydneyBristow"
>>      />
>>
>>The naming of the component already gives it away as a factory. To me that's
>>enough naming.
> 
> 
> I think I agree. This to me makes sense. If it were nameless (are
> there nameless utilities) you could then get off with just  <utility
> component=".alias.sydneyFactory" /> which is then the on/off switch we
> mentioned earlier. And an adapter should be registered the same way
> <adapter component=".alias.FidgetAdapter" /> and what it adapts
> between should be a part of the python-code with an adapts(ISomething)
> declaration, just like implements(ISomethingelse), which I think you
> suggested in your "ZCML does doo much" blog, right?

The use case here is for registering "components" (in particular,
factories) which don't / can't have the CA metadata hard-wired into
them:  e.g., they are functions, not objects, or they are in "read-only"
library code.  It is also conceivable that the metadata they declare is
overharsh, and that the component might work well with an "equiavlent"
interface to the one it was written for.  In this case, ideally one
would update the software with a more generic interface;  but allowing
the configuration file to override the metadata is a "workaround."


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD8clC+gerLs4ltQ4RAqj+AKCuEuRhN9OONBq05FaLGTiW9AJqtACguXqE
ijXt6KrV346wnho6TIKd8m8=
=nYS9
-----END PGP SIGNATURE-----



More information about the Zope3-dev mailing list