[Zope] Instatiate object instances :-)
Mario Valente
mvalente@ruido-visual.pt
Thu, 25 Jan 2001 18:44:37 +0000
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