ZODB and persistent objects
I have searched and read a whole bunch of stuff on ZODB. Why do all the examples I can google for seem to resort to telling us how to implement ZODB externally from Zope? Where is some good old fashioned example code for implementing a simple collection of objects within Zope? I want to keep a small collection of data, the last 10 customer id's that were viewed/updated, with a timestamp and maybe a brief name field. This collection will be managed by an object that can do, eg. recentCust.Add(Customer_id, BriefName) recentCust.GetList() I thought rather than poking this small dataset into MySQL, I could just keep it in ZODB as a queue-type collection of data. What is the best approach for achieving this? Do I create a folder and store persistent objects in it of some kind, or are there more suitable built-in queue classes or dictionary type features already in the Zope API? -- Les Ferguson Software developer Waitakere, NZ
Les, Do a google search on "zope folder properties". You can use a folder and add,delete and edit properties with differing data types. David ----- Original Message ----- From: "Les Ferguson" <lhf@xtra.co.nz> To: "Zope" <zope@zope.org> Sent: Saturday, August 21, 2004 6:03 PM Subject: [Zope] ZODB and persistent objects
I have searched and read a whole bunch of stuff on ZODB. Why do all the examples I can google for seem to resort to telling us how to implement ZODB externally from Zope? Where is some good old fashioned example code for implementing a simple collection of objects within Zope?
I want to keep a small collection of data, the last 10 customer id's that were viewed/updated, with a timestamp and maybe a brief name field. This collection will be managed by an object that can do, eg. recentCust.Add(Customer_id, BriefName) recentCust.GetList() I thought rather than poking this small dataset into MySQL, I could just keep it in ZODB as a queue-type collection of data.
What is the best approach for achieving this? Do I create a folder and store persistent objects in it of some kind, or are there more suitable built-in queue classes or dictionary type features already in the Zope API?
-- Les Ferguson Software developer Waitakere, NZ _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
David Hassalevris -
Les Ferguson