[Zope] Zope a good solution for this?

Michel Pelletier michel@digicool.com
Thu, 14 Oct 1999 14:25:22 -0400


John P. Corradi wrote:
> 
> Hi All,

Howdy, hmm.. jax.org...isn't that in Bar Harbour?
 
> This is a general question because I don't have Zope up and running now.
> We have a large (Sybase) database of gene expression information which
> includes an anatomical dictionary.  The anatomical dictionary is
> hierarchical - i.e. organized by embryonic stage, anatomical structures,
> substructures, cell types.  Currently there is a (Python) script that
> periodically generate HTML files from the database which list all of the
> dictionary terms in a space-delimited text format.  This format is not only
> clumsy (these are long lists), but it's also not interactive.  Ideally,
> we'd like to display the data as a hierarchical tree, allowing expansion
> and collapse of each node (e.g. click on "brain" node and get all the
> substructures of the brain, click on a brain substructure and get the cell
> types found in that substructure).  Also, we might like to have users be
> able to make queries directly from the anatomical dictionary (e.g. what
> genes are expressed in this cell type in the cerebellum?)

ZSQL method can be used to build a heirarchical tree of objects in Zope,
it would require a bit of cleverness, but you could write a simple
python product (or ZClass based) to build your tree of on-the-fly object
from the SQL database.  I think what your asking is that one of your
requirements is to keep the information in Sybase (which I recommend).

Thankfully, we are thinking about issues like this right now due to a
current paying customer.  In the progress of elaborating on our database
structure, we highlited on how Zope offers lots of good Object
Relational Tools (ZSQL Methods, datbase abstraction, record objects,
pluggable brains).  By extending relational databsed further into the
ZODB Transactional and Undo models led us to devise abstracting out of
ZODB a Zope Database Base Framework that defines how databases can work
with transactions and undo semantics.  Jeffrey pointed out how
Enterprise Objects (Apple?) allow you to work with objects whose
attributes are really columns in a relational database (thus allow you
to create instances of persistent objects whose state is preserved not
in a pickle, but in columns of database rows).  Because the underlying
plumbing builds the simple SQL to insert/update/remove 'objects' from
the relational database, it also knows how to 'undo' those actions via a
transaction log.  Now, objects whose state is stored relationaly can
participate with Zope objects like the Catalog and mechanisms like
undo.  There's a goldmine in stuff like this.

> From the Zope docs that I've read, it seems like Zope is well suited for
> this.  We also have some very good Python programmers here (and I've done a
> bit).  However, before I go full bore in trying to convince my boss, I'd
> like to hear from the Zopistas:
> 
> Does this problem scream Zope!?

Absolutely!  'Enabling' dumb relational data and turning it into web
based objects is one of Zope's core features.

> I know you can use SQL with the tree tag, but are there examples that I
> could look at?  (recent posts to the list about this haven't gotten a lot
> of responses)

Hmm.. you can, I don't know of any trivialized examples.  Of course, you
can allways hire us to elaborate on your requirements.

> What is the status of the Sybase DA?

I believe most of the organs are back in place and the patient is being
sewed up.

-Michel