[Zope3-dev] IsarSprint topics - Zope 3 application components
Jim Fulton
jim at zope.com
Wed Sep 8 07:59:46 EDT 2004
Helmut Merz wrote:
> Am Mittwoch, 8. September 2004 12:17 schrieb Martijn
> Faassen:
>
>>Helmut Merz wrote:
>>
>>>- Reference Engine (this is my personal favorite here)
>>
>>I'm interested in this topic, but won't be at the
>>IsarSprint.
>
>
> So I hope you will give us some remote support :-)
>
>
>>Could you tell me more about what you have in
>>mind for this?
>
>
> I'd like to implement something like this:
>
> class Task(...):
>
> subtasks=[]
> parenttasks=[]
>
> def assignSubtask(self, task):
> self.subtasks.append(task)
> task.parenttasks.append(self) # back reference
>
>
> Basic question: Will this work when the objects involved are
> persistent?
Yes
> When all tasks are in the same container we could work with
> the name field for referencing; or we could use the
> uniqueid utility.
You could use the uniqueid utility in any case. You could also
use IReference adapters.
> But one should also care for the cases when a referenced
> object will be deleted - so we need some referential
> constraints that are checked automatically...
Yup.
> Also often the references might carry additional information
> (metadata / annotations), so they should be real objects.
Maybe. Depends on the application.
> And there might be some general ReferenceField schema
> class...
Perhaps.
> That's the reason why the Archetypes developers have
> invested considerable effort in developing a reference
> implementation - and changed it two times.
>
> I won't suggest any Zope 3 implementation for this
> references stuff at the moment, but it would be fine if we
> could start the discussion.
Yup
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list