[Zope-dev] Re: AQ-Parent branch test failues was: Re: Five and browser-oriented components

Philipp von Weitershausen philipp at weitershausen.de
Wed Apr 16 12:29:56 EDT 2008


Wichert Akkerman wrote:
> Previously Philipp von Weitershausen wrote:
>> ViewPageTemplateFile etc. are only meant to be used as class attributes, 
>> never as instance attributes. This statement is also true for the 
>> current, acquisition-based one from Five.
> 
> Is that documented anywhere? I can't seem to find any interface or
> docstring that documents that.

I suppose not, because ViewPageTemplateFile (or ZopeTwoPageTemplateFile, 
as it used to be called) was and still is poorly documented. Initially, 
it was only used internally by the ZCML directives until people started 
  writing the view template explicitly into the view class, much like in 
Zope 3.

So no, there isn't documentation about the Five bit. But there *is* 
documentation about the Zope 3 bit (my book, for instance), so my 
argument is mostly based on the principle of correspondence between Five 
and Zope 3.

>> In my opinion, the fact that it accidentally worked as an instance
>> variable isn't a very strong argument for continuing to support it. To
>> me, this is a prime example of misusing a Five component which now
>> leads to problems when we go pure Zope3.
> 
> I'ld agree if there was a docstring or interface that made that
> explicit. I've updated the relevant code in plone.app.portlets though
> since the change is harmless.

Cool, that's great. If this is just a matter of a docstring, I'm sure 
that can be arranged :)


More information about the Zope-Dev mailing list