durusmail: quixote-users: Relational database access in Quixote applicatoins
Relational database access in Quixote applicatoins
2003-01-10
Relational database access in Quixote applicatoins
2003-01-10
2003-01-10
2003-01-13
2003-01-13
Quixote and non-programmers (was Re: Relational database access in Quixote applicatoins)
2003-01-13
2003-01-13
2003-01-13
2003-01-13
2003-01-13
Relational database access in Quixote applicatoins
Titus Brown
2003-01-10
-> I recently discovered Quixote, and there are some things I like about it.
-> I like the idea of object publishing via _q_getname().  I also observe
-> that Quixote follows Python coding conventions more closely than Webware.

We use both -- I prefer Quixote for Web applications, and Webware for
Web sites; serious programmers tend to be able to deal with Quixote
more easily, while Web developers prefer the more straightforward
(procedural?  I don't know...) style of Webware.

Gross generalizations, mind you, but...

-> However, the Web application I'm about to begin developing needs to access
-> a relational database (specifically, a MySQL database).  I need at least
-> a database connection pool, and Quixote doesn't provide this feature.
-> Webware provides a database connection pool (the MiscUtils.DBPool module)
-> and an object-relational mapper (MiddleKit).  Should I just use these,
-> or would you recommend something else?  Thanks.

I don't think there's any reason you couldn't use Webware's code,
but it's relatively easy to create your own database pool with
Queue, especially if you can guarantee that your code will return
the handler to the queue.

In Cartwheel (cartwheel.sf.net/) CVS, under

        cartwheel/lib/cartwheel/website/db_queue.py

I have some sample code that implements a fairly generic database
queue that unique assigns at most one handle per thread (potentially
zero).  I'd be happy to generalize the code for you if you want to
go that route.

--titus

reply