Hi: Can someone give any info/tips on the best way to solve this ? We have a folder "/content" containing all the diferent type of content we have available on our site. Within this folder, for example, we have a subfolder "/content/polls" where we store all the polls (instances of a Poll product). Another example, we have a subfolder "/content/articles" where we instantiate Squishdot articles. Now, the problem is that we'd like to reference those objects in several and different parts of the site. For example, we'd like to be able to reference diferent polls and diferent articles on area/folder "/Money"; and diferent polls and diferent articles on "/Games"; but an article could be referenced in "/Lifestyle" and in "/Money" We havent found an elegant OO solution. Up until now the only thing that comes to mind is that we should instatiate copies for the same object within each area/folder. This is a problem (duplicate copies, lack of data integrity, etc) The obvious solution in a non-OO paradigm would be links/pointers. But it is, of course, non-OO. And you cant do that on Zope anyway (can you?). The subject of this message is also another hypothesis: each object in Zope has a reference (the "Object Instance at #hiusd9743" messages...). Is it possible to instantiate object instances :-) ? This would be, of course, pointers. Any other options ? Is this a problem in our OO design (probable) ? How would you (suggest we) do it ? Any help/suggestions are welcome. C U! -- Mario Valente
On Thu, 25 Jan 2001, Mario Valente wrote:
The subject of this message is also another hypothesis: each object in Zope has a reference (the "Object Instance at #hiusd9743" messages...). Is it possible to instantiate object instances :-) ? This would be, of course, pointers.
This would seem to be just a perfect job for Zope's ZCatalog. There's a chapter in the new Zope book (http://www.zope.org/Members/michel/ZB/) devoted to the ZCatalog plus a number of How-Tos. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | <dtml-var pithy_quote> | http://linux.com/
Paths can be treated as "pointers", so methods getPhysicalPath/(un)restrictedTraverse may be what you need. ololo@zeus.polsl.gliwice.pl, oleks@helper.pl /--------------------------------------\ | `long long long' is too long for GCC | \--------------------------------------/
participants (3)
-
Aleksander Salwa -
Mario Valente -
Timothy Wilson