Re: [SQLObject] Zope 2/Python 2.1 support
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Ian B. <ia...@co...> - 2003-07-15 04:29:13
|
On Mon, 2003-07-14 at 22:58, Sidnei da Silva wrote: > On Mon, Jul 14, 2003 at 10:43:54PM -0500, Ian Bicking wrote: > | Do you think there is trouble outside of the Python 2.1 issue? It'd be > | a little annoying, but I'm okay with it -- when I compare it to writing > | Z SQL methods, porting SQLObject to 2.1 seems quite enjoyable ;) > > There are some stuff that would scare me. For example, getting a > SQLObject Connection to play nicely with the Zope Transaction > Machinery. Thats the tricky part. There is also a problem that its > quite difficult to get Zope to display non-persistent objects (eg: > stuff coming from SQLObject), and you can't mix new-style classes with > ExtensionClass. If you just want to use SQLObject to do the same stuff > as SQLScript, but in an easier way, you wont have much trouble, but if > you want to have SQLObject to behave like content, then it will be > quite hard, because you'll need some stuff to be persistent and some > not. Or play acquisition tricks to get SQLObjects to behave like they > are inside the ZODB. Ack... just thinking about that stuff makes my head hurt. ZODB and acquisition together create this weird environment that always seems unpredictable to me. I'd be quite happy avoiding those -- in fact, anything that allows me to avoid those would be a feature in my mind. (Well, ZODB probably isn't so bad, but I still don't entirely understand how it fits into the entire system) I would expect that SQLObject instances wouldn't live in ZODB, or in the Zope filesystem or anything like that. For rendering and manipulation you'd use Python Scripts and templates and such, i.e., SQLObject instances would never be directly published. > | Before X3 I am probably going to be pushing them to use something other > | than Zope, but that may or may not go anywhere. In my non-professional > | work (where Zope 3 would currently have to live) I'm more interested in > | other Python web stuff besides Zope. But I'd certainly support making > | SQLObject and Zope 3 work together. > > Good to know! Just for curiosity, what is the 'other python stuff' > you're interested in? Would it be Twisted? Nah, I'm not a big fan of Twisted. Nice guys, some good ideas, but I don't think asynchronous programming makes much sense past low-level stuff. Just as an example, SQLObject would not work well with Twisted at all, since it hides blocking code (i.e., database calls), and you have to be very careful about such code when doing asynchronous programming. Twisted is very different from Zope, but just as insular, which is a big drawback for me. I've worked with Webware a fair amount, and I've now I'm hoping to help bring together all the similar alternatives, of which there are an excessive number. And then there's the form processing library which is always on the back of my mind, but always feels a little way off for me... Ian |