[Zope3-Users] content object "belonging" to several containers?

Maken Seteva crapkonto at gmail.com
Mon Sep 10 17:00:04 EDT 2007


Hi!
In learning Zope 3 I'm now trying to expand the worldcookery app. So  
let's say we have a recipe site like in
the worldcookery book. If we now have a few recipe containers:

Indian
Vegetarian
Kosher

As it is right now, you can only post a recipe in one of them. But  
what if we would want to post a recipe
that is both Indian and Kosher? We would have to post it twice, not  
very nice.
I have a few possible solutions that I'd like to discuss with you. As  
I have only just recently finished the
worldcookery book I have very limited experience of how to do things  
in a "real" system so my ideas
might be bizarre :)

(1). Have a new attribute in IRecipe, e.g groups, which is a list of  
groups where this recipe belong to. The
actual recipes are then all instead stored in /recipes. And  
accessing /group/Indian be kind of like a search
query with "indian" implied"..

(2). Have a local catalog in each group (indian, veg., kosher..) and  
when a recipe is added to /recipes it is
then indexed in the appropiate local catalogs. I know you loose the  
easy doing of global searching but on
the other hand you don't get one gigantic catalog (don't know if big  
catalog is that much of a problem anyway..?)


Number 1 seems simple but I am worried (justified?) about the huge  
catalog. Number 2 seems nice smaller
catalogs but a little more complex, and you get redundant info when a  
recipe belongs to several groups (indexed
in all its groups).


Also, how would you reference a group if you have a "groups"  
attribute? By its intid? Weakref?


Thanks
Seteva

PS Thx for the quick and good answers on hurry.workflow earlier!


More information about the Zope3-users mailing list