[Zope3-dev] Content Types: What are they? Do we need them for Zope 3

Steve Alexander steve@cat-box.net
Tue, 19 Nov 2002 17:28:07 +0000


> > Maybe we just need to wait to find out?  See if Interfaces do the
> > job.  When they break down, we'll know more about what we need.
>
>
> Definitely.  I can't think of any 'Types'-based functionality which
> could not be mapped directly onto interfaces.  KISS and all that.


An object may declare that it implements many interfaces. Some of these 
interfaces are meaningful to content managers, and (suitably presented) 
are meaningful to users of a system

One way of reconciling the many interfaces of an object, with the need 
for easily-digestible content types is to have a mechanism that, given a 
collection of interfaces, returns a Content Type.

This could be implemented as an adapter of None to IContentType.
We could register additional adapters for particular content types. The 
default adapter could defer to a service that lists interfaces in a kind 
of rank-order, where the first interface in this list that is 
implemented by the object in question determines its content type.

--
Steve Alexander