[Zope3-dev] Re: yagni on overrides?
Tres Seaver
tseaver at palladion.com
Fri Apr 27 09:02:21 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jim Fulton wrote:
> I'll note, mostly in passing (drive by :) that overriding utilities,
> adapters, security setting and many other things, works pretty well
> and has for a long time. What doesn't work well is disabling things
> or dealing with things, like subscribers that can't be overridden,
> because they never conflict. In practice, this usually doesn't matter
> because, elegance aside, there usually is no harm in having extra
> configuration. Of course, there are times when it does matter, and I
> think we need something to help in those cases.
>
> I do think that Leonardo makes a valid point that factoring
> configurations might work just as well. If we had a way to disable
> configuration, say with a tagging system, then people would have to
> anticipate selective reuse by providing appropriate tags. At this
> point, you might as well just factor the files. Some of the
> proposals for configuration disabling didn't require explicit tagging
> but could use existing properties of configuration.
One example of such an implementation would be an optional, lxml-based
directive which uses the native structure of the ZCML file and XPath.
E.g. to include only adapters from a package ::
<select package="my.package" file="configure.zcml">
<path>//adapter//path>
</select>
The XPath processor would need to be passed the current namespace
mapping here, if we want to select items from the non-default namespace.
Otherwise, this would function pretty much like the 'include' directive
(it might even use that diretive's handler under the hood).
With an egg-based story, we can more easily use stuff which depends on a
third-party library like lxml; folks who can't install lxml just lose
this feature.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGMfRd+gerLs4ltQ4RAt0oAJ9P7uzGpg+9aUxojOncmwNqap57ewCdHxmw
8c8sBw06QuruSXLdAjbXBBg=
=4/9I
-----END PGP SIGNATURE-----
More information about the Zope3-dev
mailing list