I'm trying to learn how to code Plone products using Archetypes, but to get a sound understanding, I'm going through layer by layer, starting from Zope products written in Python. I have been trying Plone for about 6 months. My Python experience
is very limited.

In Zope Developer's guide at zope.org, it says that when you make products you should define the interface of your product and make the implementation class implement that interface. I understand that this "interface" is not a built in feature of Python, but a convention introduced by Zope. By following the convention,
you get some introspection capabilities that is provided by Zope libraries.

From my experience with OOP in Java and C++, using interfaces makes sense only when some code knows that interface and codes against it, or some introspection based tool (typically a GUI builder or RMI/CORBA-ish tool) will study your interface and
do something based on that knowledge.

What is not clear to me is the effect of declaring the interface of Zope products. How does Zope care about it? In "The definitive guide to Plone", the product example does not define it's own interface, but does assert that it implements some interfaces that are defined by the framework. So it seems that it is not necessary to define the inteface of your product to make it work, but still meaningful
to assert that it implements some well-known interfaces.

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?

Hideo writing from Yokohama Japan.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to