[Zope] Which part of Zope cares about interfaces in Products?
Lennart Regebro
regebro at gmail.com
Tue Nov 8 11:42:33 EST 2005
On 11/8/05, Hideo at Yokohama <hideo.at.yokohama at gmail.com> wrote:
> The Zope Developer's guide does not actually say that you must define
> interfaces to make your product work. It just says that doing so will make it
> easier for other people to understand your products. If that is the sole
> effect of using interfaces, it is just for documentation, then. Am I right?
Short answer: Yes.
Long answer: Mostly, but not quite, and this is changing rapidly. :)
Really long answer:
There are parts of Zope that cares about if a class or an object
implement a certain interface. In Zope 2, up until quite recently,
interfaces was mostly used to filter out objects. For example, you can
create an object that only lists objects that implement a certain
interface in the Add list. If you go to the Indexes-tab in a ZCatalog,
this is an example of that.
In Zope3, however, interfaces are the basis of everything. Starting
with Zope 2.8 a technology called "Five" is being used to step by step
move the Zope3 programming paradigm into Zope 2. So, with Five,
interfaces are extremely important.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope
mailing list