On 2011-3-20 17:47, Hanno Schlichting wrote:
Sure. I didn't mean to exclude this. Pyramid allows you to do a very explicit configuration without any scanning. If you write an application and have full control over all its parts, this works.
Things get complicated, once you reuse libraries which in turn have other library dependencies with configuration actions. Ignore the naming for the moment. You could call these application components, arguing that a library shouldn't have any hard configuration requirements.
Currently we have an explicit approach via providing a configure.zcml in each library, which causes all relevant parts to be imported and hooked up. One library can include the ZCML of another library or a subpackage of its own. Either each library provides a similar central place, which imports all its modules with configuration actions, or you use the scanning approach to avoid the explicit mechanism.
Also, If there's an existing mechanism that does what I want and I'm just ignorant of, I'd be happy to learn about it. If such a thing exists or can be cobbled together from existing ideas, I'd like to elevate it either as part of the ZCA or as a best-practice tool that stands independent of any particular application framework.
I think venusian, the venusian actions and the configuration machinery of Pyramid come pretty close to this. Personally I think we could extract these and roll them back into the ZTK.
Pyramid's config.include sounds like exactly that. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.