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

Stephan Richter stephan.richter@tufts.edu
Thu, 14 Nov 2002 23:14:12 -0500


On Thursday 14 November 2002 15:15, Jim Fulton wrote:
> Does Zope 3 need a "content type" concept? Is so, what should
> content types be used for?

I would love it, if we could make it without Content Types and use interfaces 
only. Since interfaces can be as specific or as general as we wish, they 
fulfill all the use cases you listed just fine. 

Additionally, I believe that since Interfaces are not as concrete they offer 
more flexibility. Therefore objects can implement several "content types" or 
objects can become a certain content type by an Adapter.

Therefore Interfaces offer all the functionality of the old "Portal Types", 
"Meta Types"  and "Content Types" and much more. Why would we want to loose 
it?

BTW, I think the case of the File and Image Content components is a perfect 
example. Let's say I have a File object called file1 and an Image(File) 
called img1. If I ask img1, whether it is an Image it will respond positively 
on the contrary the file1 response will be negative. But, since Image was 
derived from File, both objects will positively respond when asked whether 
they implement File. This use case is not possible with the current concept 
of Content Types, but can be incredibly useful, especially when building UIs.

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