[Zope] Re: Ape backwards
martin f krafft
madduck at madduck.net
Fri Feb 11 08:31:17 EST 2005
also sprach Chris Withers <chris at simplistix.co.uk> [2005.02.11.1313 +0100]:
> >But I want to do it the other way... adapt Python objects to
> >represent data in a relational database.
>
> Shane is your man for this.
Shane, come and join me for a beer then!
> But APE is actually designed for doing exactly what you want, and
> that's the way it's most commonly used.
My understanding is that it is most commonly used to store data
somewhere else (e.g. a RDB) rather than in the ZODB. This is not
necessarily what I want to do, although it is part of it.
Let me admit that I have not really looked at Ape in depth. I am
pressed for time to deliver a solution and therefore chose to invest
some time into surveying rather than diving into solutions that may
eventually be hacked/moulded to do what I want, when better
alternatives exist.
I want to make my exisiting RDB available in Zope, intuitively,
automatically, and robustly.
I want records created in the database outside of Zope to show up as
objects in Zope automatically. The same applies to deletions.
I want objects created through Zope to create appropriate records in
the RDB. The same applies to deletions.
I want to be able to edit objects and have the changes percolate to
the database. I also want changes in the database to show up in the
objects.
Is this what Ape is all about?
> I thought you were asking if you could make a relational table
> visible as Zope objects using APE, which it can theoretically do,
> and which I'm VERY interested in ;-)
Yes, this is what I am asking, I think. Are there any examples of
this? Ape looks complicated and before diving into the theory, I'd
rather explore it in action first.
> Hoever, not only is that not what you're asking for, but you may
> find ZSQL methods easier to get what you're after anyway :-)
ZSQL methods are objects representing data relations, not records or
instances in those. I know I can use a ZSQL method to get at and
store data in a RDB. I also know I can use special URLs to give the
impression of virtual objects, marshalled by the ZSQL method.
However, I am looking to provide folderish objects which can also
hold CMF objects. Think about a scientific publication: All our
publications are in the RDB so that we can easily manage m:n
relationships to authors (RDBs just excel at that, and even though
you can do it in ZODB, it's not the best tool for the job). For
every publication, we want the ability to store a PDF for access
on the Zope-driven website. I want these files to be in the ZODB,
since they are objects themselves, and I have never felt comfortable
storing objects in fields of a RDB.
So I want a way to associate a folderish Archetype (essentially just
a folderish CMF type) with a RDB table so that an instance thereof
obtains and manages some of its associated data from/in the RDB. At
the same time, the instance should also feel like a regular ZODB
object, which I can copy/paste, and in which I can store objects for
management by the ObjectManager.
Will Ape help me here?
Do you know of any product that does something similar?
Can you think of how to approach this?
Thanks,
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus at madduck.net
"i am a deeply superficial person."
-- andy warhol
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20050211/569fecc3/attachment.bin
More information about the Zope
mailing list