Chris McDonough wrote:
> I think it would be more approachable (and therefore "better" on some axis) 
> if 
> a) ZCML didn't use schemas (declarative is not a win here, as you still need 
> to 
> write imperative code in the handler, and if you *did* want declarative 
> stuff, 
> just let the handler call it),

That's true.  The handler could use a schema for validation if it wants to.

> c) handlers actually just *returned* something rather 
> than being called for their side effects. 

The thing the handler returns could implement the IConfigurationAction 
interface described here:

   http://wiki.zope.org/zope3/ReusableActions

I'm not sure the "order" attribute is appropriate, but the rest of 
Christian's proposal seems good.  Perhaps the proposal would be better 
with your suggestion to return the configuration action from the 
handler, plus one more enhancement: I think the handler should return an 
iterable of configuration actions, to make it easy to compose handlers.

> It's also completely bizarre that a 
> ZCML handler has no easy access to the registry being populated except via 
> getSiteManager().

Well, the purpose of a handler is to populate some global registry, not 
necessarily the component architecture registry, so I can see the 
reasoning behind that.

Shane

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to