[Zope] Help! How would I use Oracle for persistence?

Stephan Richter SRichter@ixl.com
Fri, 13 Aug 1999 13:28:34 -0500


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