Which Python web framework is most like Ruby on Rails?

Dave Benjamin ramen at lackingtalent.com
Mon Dec 19 20:30:52 EST 2005


On Mon, 19 Dec 2005, Paul Rubin wrote:

> "Russell E. Owen" <rowen at cesmail.net> writes:
>> I disagree. Once you've picked a database (not trivial in itself, of
>> course), you typically only have a few options for talking to in in
>> Python. Also, typically either:
>> - One stands out (because others have been abandoned or whatever), so
>> there's an easy answer, or
>
> But none of them stand out, the way the ones in PHP stand out, by
> being included in the standard library.

Well, even with PHP there are several ways to talk to a given database, 
and the library du jour has changed a few times. When I first learned PHP, 
it was pretty standard to use the mysql_* functions (and for another 
database, a set of functions specific to that database). Then, PEAR DB 
came out, which wrapped around these functions and provided some database 
abstraction for portability. This is the direction I went, but I don't 
know many others that followed.

PEAR is distributed with PHP, so it's basically standard, but in the early 
days it wasn't in the library path by default so it didn't stick out as 
the obvious way to talk to a database. Also, ADOdb was around at the time, 
which was (and still is) a pretty popular third-party interface -- maybe 
more popular than PEAR DB. And now there's the new "mysqli" interface, 
which is yet another (this time object-oriented) alternative to the 
mysql_* functions, but once again tied specifically to MySQL.

So, PHP has had the same kind of problems, even with database functions in 
the core. There's more than one way to do it, even with standard 
functions. Same with Java -- should we use the native Type 3 driver or the 
pure-Java Type 4 driver? Scrap JDBC and go with JDO or EJB? Hibernate?

I'm not saying it's necessarily a good thing to have all these options, 
but it's not atypical, especially considering how many database users are 
out there and how different their needs are. In the Java world, commercial 
vendors actually compete to produce better JDBC driver implementations, 
which increases the number of options even more but results in some 
wickedly fast and advanced drivers.

I do agree that the "obsolete" MySQLdb page needs a makeover, or to be 
removed entirely. Also, getting psycopg to install on Windows involves 
hunting around for some magic installers, and I'm afraid to delete them 
off of my hard drive because I'm not sure I'll be able to find them again. 
Perhaps all that is needed is some better organization.

Dave



More information about the Python-list mailing list