[Zope-dev] Folderish or SimpleItem object types for structural
content
Martijn Jacobs
martijn at fourdigits.nl
Mon Nov 28 19:02:37 EST 2005
Hello guys!
I have a simple question about the design of hierarchical zope product
structures in Zope 2. For example, you have categories, within
categories you have sub-categories, within sub-categories you have
sub-sub categories, within that you have content items, within content
items you have....etcetera.
All those products are different 'types', with different functionality
and different 'roles' as what they represent, so I write different
products for every type. For every object that can contain subobjects
you could derive it from 'Folder' (or Object Manager). But when you
derive all these product types from 'Folder' you end up with ALOT of
objects in your database.
In a lot of real world cases you have categories and items, that makes
things easy, but what about the structure explained above?
My question for you guys is : When do you decide to make it a Folderish
object which contains sub-objects, or to make it a Simple Item object
with, for example, some structured XML content, or dictionary / list
properties containing the 'sub-structure'? The last option is more work,
because you have to write your add/edit/delete/etc code yourself,
writing it with Folders makes it more easily, but then you have an
explosion of objects in the ZODB.
I would like to have some fresh thoughts about this, so maybe you can help.
Thank you in advance,
kind regards,
Martijn.
--
Martijn Jacobs
Four Digits, internet solutions
e-mail: martijn at fourdigits.nl | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
More information about the Zope-Dev
mailing list