[Zope3-dev] Re: zcml questions

Tres Seaver tseaver at palladion.com
Thu Sep 21 09:45:59 EDT 2006


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

Philipp von Weitershausen wrote:
> Tres Seaver wrote:
>>>> How should I do things such that they can do that?
>>> I'm just wondering whether you really need the disabling feature.
>>
>> I've wanted it.
> 
> Okay :).
> 
>> My major beef with the way we are *using* ZCML now is
>> that we expect package authors to provide policy-laden configuration for
>> their packages ("sensible defaults") but provide no means for the admin
>> to reuse that configuration selectively;  their only realy choice is to
>> *copy* the configuration and edit it.
> 
> True.
> 
>> I argued *long* ago (after the first ZC-internal Zope3 sprint, I think)
>> that the '<include>' directive should be allowed to be complex, with
>> subelements like '<except>' or '<only>' to pull in specific directives.
>>  Such a practice would require either that we have XPath support
>> available, or else that we come up with a way to mark the directives
>> (e.g., a 'zcml:id' attribute).
> 
> Well, we already sort of that this marking with "features" +
> zcml:condition. But <except> and <only> could be more powerful wrt
> packages, modules, or even classes and interfaces.
> 
>> It would *also* require that we
>> implement the "no side-effects during parsing" policy (my other favorite
>> "dead horse" in arguments about ZCML's implementation / usage).
> 
> Yup. I think there are very little side effects currently. I can't think
> of one off of the top of my head, to be honest (but I'm sure there are).

We do "eager" checking of dotted names (during the parse), which makes
it impossible to write a directive which synthesisizes the target of a
dotted name without side-effects (e.g., the 'five:bridge' directive).

If we delayed the check until after parsing was complete, then we could
eliminate one source of side effects.  Side-effect-free parsing would
open a lot of possibilities:  "ZCML introspector" tools, for instance.


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.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFEpeX+gerLs4ltQ4RApuDAJ9GW+vIzSOzCQ7vj6iUBpmkh5LeFwCcC29l
V2u8kqNL/VJKTXOEPc1Ryl0=
=gIbE
-----END PGP SIGNATURE-----



More information about the Zope3-dev mailing list