Chris McDonough wrote:
> I think it would be more approachable (and therefore "better" on some axis)
> a) ZCML didn't use schemas (declarative is not a win here, as you still need
> write imperative code in the handler, and if you *did* want declarative
> 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:
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
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.
Repoze-dev mailing list