[Zope3-dev] How about recipes for regular zope configuration?

David Pratt fairwinds at eastlink.ca
Fri Sep 21 17:08:41 EDT 2007


In z3 I like the fact that you are explicit about what you want to 
configure together. I also like buildout and eggs quite a bit and I 
believe there may be a way to bring these two facets of zope together.

I am have been thinking that it should be possible to extend buildout to 
the class level. The idea is through the application of decorators and 
methods to your classes, views, subcribers, adapters, you are 
configuring your code. The new functionality in buildout would 
autogenerate the configuration files in a similar way that site.zcml is 
generated.

Unlike grok, there is no magic since you must still be explicit in your 
code. zcml is left on the filesystem so you are able to inspect it. As 
you develop, you worry only about python with decorators and methods. 
You would rerun the buildout option with a module argument much like you 
run a test on a module. As you develop to register the new components. 
Deregistration could also be done in a similar way removing a modules 
zcml registration.

In the buildout style, recipes would we used to provide the decorator 
functionality and methods. I can see there being some evolution of 
generic functionality as has been occuring with the many recipes out 
there now. I realize buildout is a generic tool but would this sort of 
extension be of interest? This may not be that difficult and something 
that I like is that it could be incrementally added to your classes to 
phase out manual configuration as manual and autoconfiguration could 
live together. The other upside is that it would be completely optional 
how you wished to configure. I think zc.buildout is the place for this.


Many thanks.

Regards,
David


More information about the Zope3-dev mailing list