Web Development with TurboGears and Python
rdelon writes "TurboGears was previously mentioned here as "Python on Rails". It has since made tremendous progress and is now a popular Python web MVC framework (along with Django). IBM developerWorks just published a great article about TurboGears and a book is on the way. Unlike Rails and Django, TurboGears is made up of several pre-existing subprojects. One of the great features of TurboGears is the 'toolbox,' which allows you to configure and check various aspects of your application and database in a browser."
FYI Guido van Rossum prefers Django (from his blog).
And people that use web frameworks in Python will probably be interested in WSGI 1.0 (the Python Web Server Gateway Interface) that will be added to the standard library in Python 2.5: it will probably be supported by all the major Python web frameworks.
There's a hidden treasure in Python 3.x: __prepare__()
One excellent Python project that doesn't get enough publicity is my favorite ORM tool by Michael Bayer - SqlAlchemy http://sqlalchemy.org/. Think Rail's ActiveRecord with Hibernate power.
There was some talk of integrating it with TurboGears to create some competition for SqlObject. Not sure where this stands currently.
In an attempt to combine all the best of web frameworks into one event, I interviewed Adrian Holovaty of Django on the Ruby on Rails podcast: Adrian Holovaty on the Rails Podcast He's a smart programmer and it helps to see the different philosophies behind the way popular web frameworks were constructed.
One of the most appealing aspects of Turbogears imho is the work to supersede the db layer, currently SQLObject, with SQLAlchemy. The problem with most web frameworks is that their ORM db layers treat the db as just an object store, rather than as a relational database. This works for relatively simple 37signals-esque websites, but not for more complicated sites that require a relational algebra engine, for example any relativley complicated web-based BI application or booking engine. For example, one of the fundamental features of the relational model is that the result of any query against a table or number of tables is another table. In that respect, SQLAlchemy lets you map classes not just to tables, but also to joins, unions, and subqueries (which are themselves tables). Turbogears is the only framework I know of so far that is attempting to integrate SQLAlchemy. They're still in the relatively early stages of the integration, it seems, but are working to provide an easy migration from SQLObject to SQLAlchemy when the latter is ready, making TurboGears top on my list of webframeworks to consider/recommend for new projects.
Flying is easy, just throw yourself at the ground and miss. -Douglas Adams