Stephan Richter wrote: > On Tuesday 17 March 2009, Martijn Faassen wrote: >> If a package defines a *lot* of ZCML, we will have to wonder about the >> purpose of the package (is this really a library-like package or more >> like an application defining a UI or something?), and we'll have to >> think about another strategy. >> >> I want to move this discussion to concrete examples next and see what a >> treatment of moving out ZCML would entail. > > A common complaint I am hearing about z3c.form, for example, is that I should > use the ZCML more in my doctests, so that the doctests contain more example > on how to use ZCML to create z3c.form pages. > > At work I have started taking this approach more and more and it makes tests > actually more readable and provides better documentation to consumers of the > libraries/code.
I have had the same realisation. One possible compromise if you don't want to actually use the XML configuration language, is to show an example ZCML file, but to actually register with the zope.component API. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )