During the gocept sprint on z3c.form last week we found that the interface
of pagelets (z3c.pagelet.interfaces.IPagelet) is a mere marker interface
on top of IBrowserPage, which seems to me a bit thin.
For one, the implementation of pagelets makes use of the render and update
methods. Since these methods are the ones to be customized when writing
custom pagelets, they should be documented.
While it would be easy enough to just add the methods to IPagelet (which
has actually been done for render by now), I think IPagelet should really
be an extension to zope.contentprovider.interfaces.IContentProvider in
addition to IBrowserPage. It is already possible to use pagelets such as
z3c.form.form.Form as content providers. While the pagelet implementation
distinguishes between pagelet and pagelet renderer, only the latter being
declared the content provider, this distinction seems to be made only in
order for the content provider lookup to return the same pagelet instance
that is the view. The renderer then only (sort of) forwards the pagelet's
own content provider functionality, so the pagelet might as well be
declared a content provider itself.
Any thoughts, objections, ideas?
Zope3-dev mailing list