[Zope3-dev] Re: What don't file-system-based developers need

Jeffrey P Shell jeff at bottlerocket.net
Thu Feb 12 13:07:58 EST 2004


On Feb 12, 2004, at 5:54 AM, Philipp von Weitershausen wrote:

> Jim Fulton wrote:
>>> If you're referring to the content objects, then I wouldn't need 
>>> them. But that's probably I dislike their concept anyway (as much as 
>>> I dislike ZPT Page and DTML Page).
>> Do we have a file-system-based flavor of these?
>
> No, and I don't think that would be necessary. Scripters use 
> SQLScripts and SQLExpressions TTW. File-system developers would 
> probably use SQLObjects. Sidnei uses that, for example. I think he has 
> a 'sqlobjectsupport' product to bind them into Zope3. Don't know where 
> that is, though... (wink at dreamcatcher ;)).

Would probably use them, but not always.  I've become disillusioned 
with O-R Mapping, and there are definitely times when - NOT AS A 
SCRIPTER - I still need to use fairly plain SQL.

I've been doing this in file system development in Zope 2 by doing:

from Products.ZSQLMethods.SQL import SQL as SQLMethod
DBNAME = 'dbc'         #name of Database Adapter

class Frobnitz(...):
	listUpcomingShows = SQLMethod(
		'listUpcomingShows', '', DBNAME,
		'max_date=""',
		""" <SQL Method Code Here> """,
		)

We're moving to our own data management framework anyways, but there 
are still situations where:

- I need to do complex queries.
- I don't want the overhead of O-R Mapping (shocking, considering how 
much I used
   to want it).
- I do want Zope to manage the database connections and transactions 
automatically.
   (it's been nice, for example, to not have to worry about threads and 
all that -
   just query your adapter and run with it).

I'd like to have the latter, even if I don't have something akin to SQL 
Methods.  I just want a [service|utility] that I can configure and then 
send SQL Statements to and get result objects back from.  The DTML SQL 
tags are nice, but I could live without them.




More information about the Zope3-dev mailing list