Hi Thomas

> Betreff: [Zope3-dev] Re: AW: AW: Re: AW: Are pagelets content 
> providers?
> Roger Ineichen wrote:
> > 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.
> See my other response I wrote before I read this message of yours.

As longer as I think about your idea, you are probably right.

I agree with not declaring __init__ in the interface. That's what
we did. The only concren I have right now with IPagelet is inherited
from IContentProvider is the default TALES expression which 
uses the following code for lookup IContentProvider:

class TALESProviderExpression(expressions.StringExpr):
# Try to look up the provider.
provider = zope.component.queryMultiAdapter(
    (context, request, view), interfaces.IContentProvider, name)

This requieres a specific __init__ method.

What do you recommend to do? I'm open to improve it but how can
we reflect the different adaption concepts like we have with the
different __init__ used by IPagelet and IContentProvider.

I agree that __init__ is not a part of the interface. But I also
think it should be a part of a (probably another) interface since 
this is required by a specific lookup pattern.

But that's probably over designed.

Any idea?

> > 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.
> This would solve my use case but sounds like a lot of 
> architecture, to be honest. I think this is exactly what I 
> hoped to avoid by pinning the internal communication between 
> pagelets and pagelet renderers down to talking 
> IContentProvider and thereby allowing pagelets to be used as 
> content providers from everywhere. See the "dead chicken" 
> remark in my first reply to you.

Ok, I see your idea

Roger Ineichen 

> --
> Thomas
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev@zope.org
> Unsub: 
> http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to