An alternative to including addresses in the ICompany/IPerson schemas
would be to use Annotations. And you might also consider using a
relational database. For me, the "add an Address Object" notion does not
make much sense - either the address fields are part of the IPerson and
ICompany schemas or they are not.
Cliff
Jachin Rupe wrote:
hi there
I have another "zope theory" question. I am working on designing a
application in zope. I've been looking at a lot of examples and I am
wondering how people are implementing different types of relationships
between different persistent objects.
For instance I am going to be doing a lot with addresses. Naturally it
would be nice to have persistent Address class. Then I would say that
a Person has an Address and a Company has an Address.
My two different ideas are as follows:
1. Make Person and and Company containers that can each contain an
Address. I don't really like this idea because it seems like container
objects are for things like folders. This could be the best way though
and I'm just not zoppie enough yet.
2. Add an Object for the Address to the schema for IPerson and
ICompany (assuming I only need one address) or a List / Dict (if I want
more than one address for each person or company). I like this idea
better but I have yet to see any examples where someone does that which
is making me a little nervous. Among other things I'd like to be able
to see what happens when "addform"s and "editform"s get generated for
things like this or at least be assured that's the way it is supposed
to work.
I just got my very own copies of the "Zope 3 Developers Handbook" and
"Web Component Development with Zope 3" (I'd suggest these books to
anyone by the way). I have given each a once over as well as looking
at lots of shorter tutorials / examples online and have not noticed any
example projects doing anything like my second idea.
So in your answer please feel free to point out something in either of
those books (I may have missed) or refer me to some other online
example where something like this is going on.
thanks
-jachin
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users