Re: [Zope-dev] Manual object-to-relational persistency framework
Thanks Dieter, I think ZPatterns is certainly worth a look. It allows you to slice-and-dice what you want to store in ZODB or RDBMS. The best part is you can develop totally in ZODB, then migrate to RDB a bit at a time (if you like) without changing your app, or your data classes. We have multiple instance of the same app mixing up ZODB, RDB, LDAP etc.. since all the wiring of data-objects is done in configurable data managers on an instance by instance basis. http://www.zope.org/Members/pje/ZPatterns for Zope-2.[45].x see also: http://www.cat-box.net/steve/TransactionAgents Three chapters of our book (www.zopeonarope.com) are devoted to implementing ZPatterns based apps. good luck! -steve On Friday, March 8, 2002, at 02:56 PM, Dieter Maurer wrote: Bjorn Stabell writes: I'm trying to use Zope without storing everything in ZODB while still having the perception of an object-oriented database. I want to control the object-to-relational mapping layer, but would like the loading and saving of objects to be automatic. Is there some way to do that using Zope? Maybe ZPattern? Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Manual object-to-relational persistency framework
On Friday, 8. March 2002 09:50, Bjorn Stabell wrote: I'm trying to use Zope without storing everything in ZODB while still having the perception of an object-oriented database. I want to control the object-to-relational mapping layer, but would like the loading and saving of objects to be automatic. Is there some way to do that using Zope? Where would I, e.g., hook into to get automatic loading/cacheing/saving of objects that weren't stored in ZODB, and where I could actually create the methods to load/save objects myself (I want to control the data structure). Sounds like changing the (default) backend of the ZODB. That way you use Zope with the ZODB but your objects are stored in a RDBMS too. ZODB comes with several backends (a.k.a Storages), the default FileStorage, DemoStorage, OracleStorage. The latter doing already object relational mapping to Oracle RDBMS. If you want to control the mapping, just define your own Storage (I do not know how hard it is, maybe the 'gurus' do?) and then tweak your Zope instance to use your custom Storage instead of the default FileStorage. That way you do not have to care about automatic loading/saving of your objects. Regards, Thomas -- Webmaster Innovationskolleg Theoretische Biologie http://itb.biologie.hu-berlin.de ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Manual object-to-relational persistency framework
Thomas Förster wrote: On Friday, 8. March 2002 09:50, Bjorn Stabell wrote: I'm trying to use Zope without storing everything in ZODB while still having the perception of an object-oriented database. I want to control the object-to-relational mapping layer, but would like the loading and saving of objects to be automatic. Is there some way to do that using Zope? Where would I, e.g., hook into to get automatic loading/cacheing/saving of objects that weren't stored in ZODB, and where I could actually create the methods to load/save objects myself (I want to control the data structure). If you want to control the mapping, just define your own Storage (I do not know how hard it is, maybe the 'gurus' do?) and then tweak your Zope instance to use your custom Storage instead of the default FileStorage. That way you do not have to care about automatic loading/saving of your objects. One suggestion more: not use instead of FileStorage but in addition to main storage. You can see how external storages are mounted into ZODB as subtrees at http://www.zope.org/About ([EMAIL PROTECTED] are mounted just in that way). -- Myroslav Opyr zope.net.ua http://zope.net.ua/ ° Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] cell: +380 50.3174578 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] Manual object-to-relational persistency framework
I think the Storage interface wroks at a lower level, dealing with pickled Python objects. I'd like to do it at a higher level, so I can define my own object-relational mapping, unique for each object type I want to use the Zope framework (acquisition, access control, automatic persistence) and still have the objects stored in a nice domain specific relational schema, not storing anything (even ghost objects) in the ZODB, but having live objects available as usual. Ideally, it should be possible to get the the data for the objects from anywhere. I guess it would be possible to make a special Storage interface that calls hooks in objects that have them to actually implement the storage/persistency functionality, but that seems kind of overkill and it'd mean I have to mount another Storage etc. There must be any easier way? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Posted At: Friday, March 08, 2002 17:27 Posted To: Zope Developer Conversation: [Zope-dev] Manual object-to-relational persistency framework Subject: Re: [Zope-dev] Manual object-to-relational persistency framework On Friday, 8. March 2002 09:50, Bjorn Stabell wrote: I'm trying to use Zope without storing everything in ZODB while still having the perception of an object-oriented database. I want to control the object-to-relational mapping layer, but would like the loading and saving of objects to be automatic. Is there some way to do that using Zope? Where would I, e.g., hook into to get automatic loading/cacheing/saving of objects that weren't stored in ZODB, and where I could actually create the methods to load/save objects myself (I want to control the data structure). Sounds like changing the (default) backend of the ZODB. That way you use Zope with the ZODB but your objects are stored in a RDBMS too. ZODB comes with several backends (a.k.a Storages), the default FileStorage, DemoStorage, OracleStorage. The latter doing already object relational mapping to Oracle RDBMS. If you want to control the mapping, just define your own Storage (I do not know how hard it is, maybe the 'gurus' do?) and then tweak your Zope instance to use your custom Storage instead of the default FileStorage. That way you do not have to care about automatic loading/saving of your objects. Regards, Thomas -- Webmaster Innovationskolleg Theoretische Biologie http://itb.biologie.hu-berlin.de ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Manual object-to-relational persistency framework
On Friday, 8. March 2002 13:06, Bjorn Stabell wrote: I guess it would be possible to make a special Storage interface that calls hooks in objects that have them to actually implement the storage/persistency functionality, but that seems kind of overkill and it'd mean I have to mount another Storage etc. There must be any easier way? For custom objects (Python Classes) you might as well have a look at the DBObjects Product by Stephan Richter. Regards, Thomas -- Webmaster Innovationskolleg Theoretische Biologie http://itb.biologie.hu-berlin.de ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Manual object-to-relational persistency framework
Bjorn Stabell writes: I'm trying to use Zope without storing everything in ZODB while still having the perception of an object-oriented database. I want to control the object-to-relational mapping layer, but would like the loading and saving of objects to be automatic. Is there some way to do that using Zope? Maybe ZPattern? Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )