Dominik Huber wrote: >> Now that this proposal has been dealt with, I will turn my focus of >> attention to >> http://dev.zope.org/Zope3/ReducingTheAmountOfZCMLDirectives. Since my >> initial announcement of the proposal I made some minor ammendments >> regarding the 'content' directive. Please check them out and give me >> feedback. I plan to start working on the implementation this week. > > I like those simplifications, but I have two little objections... > > The factory directive particularly within the class directive is very > convenient and I use them fairly often. So I would miss that shortcut, > because it saves a few lines of replicated code :( > > In addition the coupling of class/factory and class/implements is very > concise and handy too, if you like to include 'external' packages into > your application. In such a case I don't like to write an extra modul > for the factory implementation and the class-implements-declaration. IMO > this use case is focused to a component registration aspect and zcml > would be the right place to cover it. > > I would vote to leave at least the class/factory and class/implements > subdirectives.
The class/implements subdirective is debatable because putting an interface on a class might be considered some sort of policy. So I don't feel too strong about it. The class/factory case however is clearly about automation. As demonstrated in the proposal, the Python version with a simple utility directive is only two or so lines longer and essentially moves most of the information from ZCML to Python code. It also reuses the well-known utility directive which makes registering factories very coherent: No matter whether they are custom or based on a callable like a factory from class, you just use the utility directive. Coherence is one of the initial problems I state in the proposal so I rather feel strongly about the class/factory case. Philipp _______________________________________________ Zope3-dev mailing list Zope3email@example.com Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com