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

Jim Fulton jim@zope.com
Thu, 14 Nov 2002 15:15:05 -0500


Historically, Zope has a notion of "type" that has not been
very well defined.

- Zope 2 has something called "meta type".  This is used for at
   least two different things in Zope 2:

   o As a nice name for an object type (class).

   o As a name for constructors in add menus. Note that these were
     originally intended to be constructors for specific object
     types, but later they included things like "Zope Search
     Interface", which didn't build any one specific object type.

   In addition, I'm told that Silva selects UI components based om
   meta type.

- The Content Management Framework (CMF) has "portal types".
   Portal types were orginally meant to be like meta types that
   could be set on individual instances.  Instances with the same
   meta type could have different portal types, to reflect
   different usages of the same underlying implementation.  Also,
   while Zope meta types are just strings, portal types name
   objects that provide meta data and functionality.

   The CMF uses portal types in a number of ways:

   o Portal types allow type-specific configuration. Portal types
     are used as keys into a variety of registry (or registry-like)
     mechanisms, including:

     - Skins, which associate templates and scripts with portal
       types to provide custom user interfaces and application logic.

     - Workflows

     - Actions, which reporesent type-specific applications

     In this respect, portal types in the CMF are used the same way
     that interfaces are used in Zope 3.

   o Factories are defined for portal types. There's a one-to-one
     relation between factory and portal type.

   o Portal types have meta data.

I think that many people think of content types as naming
specific concrete types of objects.  People might expect a
content-type to include specific information. This makes content
types a bit more concrete that interfaces.

Zope 3 has no separate notion of content types.  It does have
content components.  Zope 3 also has interfaces. Content
components often implement a number of interfaces. No one
interface is designated to be the content type, although, in most
cases, it would be fairly straightforward to do so.
Content components usually register factories,
but there's no association between factories and interfaces.

Does Zope 3 need a "content type" concept? Is so, what should
content types be used for?

What should content types be used

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org