AW: AW: [Zope3-dev] Re: AW: Are pagelets content providers?
Roger Ineichen
dev at projekt01.ch
Tue Oct 2 07:13:58 EDT 2007
Hi Jacob, Thomas
> Betreff: Re: AW: [Zope3-dev] Re: AW: Are pagelets content providers?
>
> Hi Roger,
>
> I didn't follow this discussion closely but thought this
> needed a comment.
>
> Roger Ineichen wrote:
>
> [snip lots of context...]
> > Did you recognize that the __init__ are different.
> >
> > A IContentProvider defines:
> >
> > def __init__(self, context, request, view)
> > self.context = context
> > self.request = request
> > self.view = view
> >
> > and a IPagelet defines:
> >
> > def __init__(self, context, request):
> > self.context = context
> > self.request = request
> >
> > Probably we should describe this in the interface too.
> > This whould manifest the difference of content provider
> which provide
> > content and pagelets whcih defines content in a better way.
> >
> It would make sense to have the 'view' attribute a part of
> the IContentProvider interface, and *that* might make them
> different. The constructor signature is all about the class
> instead of the instance and should therefore *not* be part of
> the interface.
>
> It is perfectly reasonable to have a number of different
> (multi-)adapters with different signatures that adapt to the
> same interface.
>
> Hope this makes sense. I'll go back to lurking now.
Yes you are right, that was the reason I didn't define the
__init__ method in the interface. But I still think a
IPagelet isn't a IContentProvider by default. Of corse
another class can be defined as IContentProvider and IPagelet.
Such a class whould then provide a different __init__ method
then the pagelet does right now.
Thomas;
Should we implement a z3c.form/z3c.pagelet package?
There we could support z3c.form base classes built
up on pagelets.
Probably called z3c.formpagelet which contains
IPageletForm, IPageletAddForm etc.
Regards
Roger Ineichen
> Regards
>
> Jacob
>
> --
> Jacob Holm
> CTO
> Improva ApS
>
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub:
> http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
>
>
More information about the Zope3-dev
mailing list