[Zope3-dev] Simplifying Zope 3 and creating a foundation for thefuture

Dominik Huber dominik.huber at projekt01.ch
Wed Jan 7 14:08:00 EST 2004


I'm still a little confused about the principles when should I use adapters
or when should I implement things straight forward into a content
components? (implementation versus adaption)

I read the object adaptation pep (PEP 246). I estimate the main advantage
using a function like adapt (PEP 246) or getAdapter (Zope3) is that we don't
have to decide this question by the framework in advance. So this decision
will be a design or strategy option of the application developers.

Zope3 sometimes anticipate this decision because it assumes implicitly that
*only* the content component implements a given interface or protocol.

exp.
IContainer: zope.app.browser.container.contents.Contents
schema implementations with widget/form framework (add and edit forms)

Is there a specific reason why object adaption is only sometimes implemented
'purely'?

I know that adapters are not persistent. But given the fact, object
annotations are allowed, stuff like containers resp. schema implementations
could be store via adapter as annotations too.

If there are no realy 'important' reasons it might be
- a simplification to implement object adaption consequently because the
framework
  works more uniform.
- a more flexible foundation for the future because things are more
  compatible and exchangeable

thanks for thoughts and answers.

regards,
dominik








More information about the Zope3-dev mailing list