[Zope] Zope and Objects

Jeff Childers jchilders_98@yahoo.com
Tue, 25 Mar 2003 08:30:40 -0500


I'm starting to get the "big picture" but I'm still a little fuzzy on the 
details, particularly about objects and the ZODB. I'm hoping that someone 
can give me some brief pointers to where the answers the these questions 
lie. I have read a *bunch* of Zope doc and I'm pretty handy with Python.

1) Where are data object classes defined in Zope?

I get the persistent object thing. Very cool. So let's say I want to write 
a billing system. I have customer objects, invoice objects, and payment 
objects. [ Customer [ Invoices [Payments] ] ].

a) Where do I put the code that defines each custom class? Scripts seem to 
be for def-functions. Do I have to put this outside Zope?

b) Do I use ZCatalogs to 'index' my objects so I can query them similar to 
SQL? If so, how/where do I add my custom classes to the ZCatalog?

2) How do I instantiate and persist (through the session) a particular 
instance of the class from the ZODB (i.e. a certain customer)?

I realize these are big questions. Any pointer toward answers, even which 
documentation I should be reading, would be helpful and greatly appreciated.

Thanks!

Jeff Childers