[Zope3-Users] To Subclass, or to Adapt?

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 12 06:12:57 EDT 2005


On Friday 12 August 2005 04:20, Dominik Huber wrote:
> Your question points out the general problematic the implementation
> decision between classification and composition. Zope 3 has the power to
> reduce an object to its *pure* identity and implement all further
> functionality by adapters and annotated objects (see
> zope.app.annotation). This possibility allows you to build objects
> heavily throu composition. In extreme case the classification aspect is
> *only* used to determine the adapter lookups and other registration
> aspects.
>
> Therefore it will be usefull to use interfaces to build the above
> classification, but - and that's very important - that does not mean
> that you transfer this classification directly to your deeper
> implementation (classes), but you could use *pure* marker interfaces for
> that classification purpose too. Those pure marker interfaces could mark
> instances of a generic object implementation [1].

Right, I know you follow this approach with Tiks and it is probably a good 
approach for CMSs, where everything depends on the behavior in the system, 
but for regular applications its bogus. I really expect my core objects to 
have a core functionality.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list