[Zope] zope da's

Chris Petrilli petrilli@digicool.com
Wed, 15 Dec 1999 19:51:33 -0500


I hope that George doesn't mind my copying the entire list, because I
think he raises some philosophical issues that people probably haven't
dealt with before...

> chris you are correct that is what I meant.  why build 
> DA's specifically
> vs making a PDBC (python database connection)?!?! or some type of
> abstraction layer.  this is what john udell was talkign about 
> w/ unix (lack
> of consistent database abstraction layer to talk w/ that DBI 
> provides for in
> perl on unix) in one of his articles.  and I think ODBC works 
> fine on NT and
> helps speed development.  

In fact, Python has something called the DB-API
(http://www.python.org/topics/database/DatabaseAPI-2.0.html) which
provides somewhat of an abstracted interface.  While this works for
certain types of applications, we've found that a lot of the things we
need aren't compatible with what other people want in their behaviour,
and therefore we've been forced to write our own spec.  This is
amazingly unfortunate, but sadly necessary, especially when dealing with
exception handling.  Perhaps we should push more to shape the DB-API
spec, but I believe Jim can speak more fully on why that hasn't been
done in the past.
 
> -> yes, i understand that the db enginers/syntax can change 
> in rev's- but
> your SQLMethods inside of zope will break just as well if sql or sp's
> change.  <this is life?>

If you write your SQL in such a fashion as to use (for example)
comparison operators that are specific to the database you're working
wtih, yes it will break.  It is possible to write it in such a fashion
that it won't break.  This in may ways is no different than writing to
the ODBC spec...

> SQLMethods aren't dependant on the db your running? there 
> needs to be
> lots of documentation on this subject matter, because I 
> havent run across
> this.  how do you keep sqlmethods 'da' independent?  

Because they talk via a defined API to the "Connection" object they are
associated with.  If you change the Connection object, then it will use
a totally different database.  I think this is reasonably well
documented, if not, then it should be...

> coding both on *nix and NT, I can honestly say that ODBC 
> is a huge help.
> and if a ODBC driver released by Oracle are bad- what would 
> make digicool
> being able to make these DA's and keep track w/ them.

Unfortunately, ODBC is terribly incomplete when it comes to BLOB/CLOB,
stored procedures, and other things that we have on the horizon.  I know
this because we're currently trying to unify ODBC and X/Open CLI
together, and ODBC is missing many many pieces.

> ->I'm sorry I was not talking specifically about JDBC but rather the
> abstraction layer that JDBC is associated w/.  

We provide an abstraction layer, perhaps it's just not given an acronym,
but let's do that: 

	ZDBC ;-) 

Seriously though, it is there, there is a strong OO abstraction, and
even more so on the result side of things.  The fact that it's not ODBC
doesn't make it less useful, especially given its origins and goals.
 
> I would much rather see digicool manage the documentation effort and
> concentrate on teh application server than spending time each 
> time oracle
> revs on ccoming out w/ a new DA.  

Actually, we've written things pretty tightly and if you can find some
way for us not to have to do this on ALL platforms that we support (i.e.
UNIX and NT), then it's a different question, but ... unfortunately, we
can't tell people to go out and buy NT because all we support is ODBC.
The UNIX world does not have such an abstraction, sadly.  I wish it did,
it might even be more useful than ODBC is.

> but that is a 1000' view and I acknowledge that.  your 
> response also makes
> me realize  that I need to be much more specific in my 
> communications, I
> apologize.  Maybe I'm deeming an OS-centric layer be admin'd 
> and handled by
> an application, zope- ODBC.  and I've taken a quick poll and 
> no developers
> here have had exceedingly large headaches w/ ODBC.  

But have they ever tried to support the same application on 20 different
OSs?  Do they use ODBC on all platforms, or just on Win32?  Remember, we
are *cross-platform*.

I will note that competitors such as Vignette talk natively, while
people like ColdFusion (which is largely a NT product) talk ODBC---and I
have no idea what they do on Linux.

Chris