[ZODB-Dev] AdaptableStorage and ZClass instances
Shane Hathaway
shane@zope.com
Thu, 13 Feb 2003 12:09:43 -0500
Rocky Burt wrote:
> My first impression is that the referred Modeling project is overkill
> for what we need. My suggestion would be to go the route of factoring
> out the sql for database compliance for "default" mapping (the mapping
> that already exists).
Yes, you're probably right: Modeling does a lot that AdaptableStorage
does differently. I haven't done anything more than look at the web
page, though. :-)
> For people adding their own mappings (for their own objects), they will
> want complete control on how the data is stored in the db. I'd suggest
> AdaptableStorage provide only a framework for this. Maybe some sort of
> a "define a sql statement for each of these functions" type thing:
> 1) inserting an object
> 2) deleting an object
> 3) updating an object
>
> What I'm envisioning is a really simplified version of J2EE EJB BMP.
> (and yes, i'm from java-land, but I like this land better ;))
>
> J2EE = Java2 Enterprise Edition
> EJB = Enterprise JavaBeans
> BMP = Bean Managed Persistence
That sounds appealing, and I think it would work. Most of the SQL
specific code could be genericized with only a little effort. Look at
SQLObjectData.py, for example: its only responsibility is to load/store
a string in a table, indexed by key. That obviously shouldn't require
74 lines of code.
> ps. I suspect many people will just go ahead and use the default
> mappings anyhow.
Agreed.
Shane