Help! How would I use Oracle for persistence?
I'm trying to evaluate Zope for use in our scattering of projects, and it's been maddeningly delightful. I see a design with wonderful cleanness and simplicity, yet complete coverage for all we need to do. The one problem I have is that old standard Unix problem: all the documentation assumes you already have the specifics you need from some other unspecified, and in this case nonexistent, document. After days of digging through every available document and the archives of this list, I realized that it should be possible to store stuff in a database if I can figure out a handful of things I can't seem to glean from the documentation: 1) Where do I put the python files to use in an External Method? Here, the documentation offers a couple of highly ambiguous hints (Put them in the Extensions directory of your Zope directory, which directory you may have to create. OK, that narrows it down to maybe a dozen that this term could refer to. Or an Extensions directory under your product (lib/python/ Products/<myProduct>/Extensions) - now that's the least ambiguous one, but I can't help suspecting there's a key fact or 60 being left out here... Since most of the rest of the documentation assumes you already know almost everything you need, and refrains from 'repeating' it. 2) Can an External Method, or more to the point, an Extension, get at other Zope objects? If so, I can use the Oracle connection I put in my folder and which is obligingly open. If so, how? This doesn't come up in any of the examples. Answers to these two may let me do some trivial prototyping so I can find out if this thing is as wonderful as it looks. I assume it must be, because everybody keeps making sense in their praise of this obviously wonderful design. I'll be willing to accept the idea that I'm a fool not to use Bobo, too, but I still need these answers to stand a chance either way. I'll be delighted to help make documentation improvements, because if it is this great, it deserves to be useable by everybody. Frankly, the documentation as it stands is great marketing material, but maddening if you want to insert and update data in a database, or indeed add/update data at all. -- Bradford K. Hull | **> Never let a computer see you hurry. <** brad@tera.com | Bradford K. Hull (206)701-2066 |
Donot worry, the list will help you. I shared your frustration with you about a week ago, when I started using Zope. With the help of the list which I subscribed to, I found out a lot of stuff and got good in Zope development in about 2 days. Believe me, it is very simple and Zope is awesome!!!. It ry to answer some of your questions. :) On Fri, 13 Aug 1999, you wrote:
I'm trying to evaluate Zope for use in our scattering of projects, and it's been maddeningly delightful. I see a design with wonderful cleanness and simplicity, yet complete coverage for all we need to do. The one problem I have is that old standard Unix problem: all the documentation assumes you already have the specifics you need from some other unspecified, and in this case nonexistent, document.
After days of digging through every available document and the archives of this list, I realized that it should be possible to store stuff in a database if I can figure out a handful of things I can't seem to glean from the documentation:
1) Where do I put the python files to use in an External Method? Here, the documentation offers a couple of highly ambiguous hints (Put them in the Extensions directory of your Zope directory, which directory you may have to create. OK, that narrows it down to maybe a dozen that this term could refer to. Or an Extensions directory under your product (lib/python/ Products/<myProduct>/Extensions) - now that's the least ambiguous one, but I can't help suspecting there's a key fact or 60 being left out here... Since most of the rest of the documentation assumes you already know almost everything you need, and refrains from 'repeating' it.
I had the same problem. The Extensions directory needs to be in your Zope Home directory: /home/of/Zope/Extensions for example: /opt/Zope2/Extensions
2) Can an External Method, or more to the point, an Extension, get at other Zope objects? If so, I can use the Oracle connection I put in my folder and which is obligingly open. If so, how? This doesn't come up in any of the examples.
Yes, they can. Just pass self as an argument to the function (method) you write. DB stuff: I know it does not come up, because you are not supposed to do that. You will never need to access the DB from an External Method. You can do all the querying qith Z SQL Methods and DTML and then use external methods to do stuff DTML cannot. That is usually not much. I use external methods for encryption for example.
I'll be delighted to help make documentation improvements, because if it is this great, it deserves to be useable by everybody. Frankly, the documentation as it stands is great marketing material, but maddening if you want to insert and update data in a database, or indeed add/update data at all.
I agree. I still wait for a complete Syntax Reference. The Guides just do not do it (and I read them three times already). stephan -- Stephan Richter iXL - Software Designer and Engineer
On Fri, 13 Aug 1999, Bradford Hull wrote:
1) Where do I put the python files to use in an External Method? Here, the documentation offers a couple of highly ambiguous hints (Put them in the Extensions directory of your Zope directory, which directory you may have to create. OK, that narrows it down to maybe a dozen that this term could refer to. Or an Extensions directory under your product (lib/python/ Products/<myProduct>/Extensions) - now that's the least ambiguous one, but I can't help suspecting there's a key fact or 60 being left out here... Since most of the rest of the documentation assumes you already know almost everything you need, and refrains from 'repeating' it. Well, ZOPE does know about two special directories: SOFTWARE_HOME and INSTANCE_HOME. The first is the directory that extracting the Zope tar.gz created. The second one happens to contain your access file, the var directory, etc.
You can have the External directory in both of these.
2) Can an External Method, or more to the point, an Extension, get at other Zope objects? If so, I can use the Oracle connection I put in my folder and which is obligingly open. If so, how? This doesn't come up in any of the examples. Well, you "oracledb" object is just self.oracledb. Which methods it does support is, to my knowledge, only documented in the 100% correct reference document, the source :)
Answers to these two may let me do some trivial prototyping so I can find out if this thing is as wonderful as it looks. I assume it must be, because everybody keeps making sense in their praise of this obviously wonderful design. I'll be willing to accept the idea that I'm a fool not to use Bobo, too, but I still need these answers to stand a chance either way. Well, as having been one of the last Bobo supporters, I'm not that sure that you are right. (or that I've been right)
For most cases ZOPE as a whole is best. Actually, I can envision only some cases where ZPublisher alone might make sense, for example small web applications that aren't modified by the user, but do work much on file data sources.
I'll be delighted to help make documentation improvements, because if it is this great, it deserves to be useable by everybody. Frankly, the documentation as it stands is great marketing material, but maddening if you want to insert and update data in a database, or indeed add/update data at all. Well, for inserting, updateing you don't need external methods, Z SQL Methods are more than ok for this :)
Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
participants (3)
-
Andreas Kostyrka -
Bradford Hull -
Stephan Richter