TurboGears rules!

These days I checked out TurboGears, a Python rapid web development megaframework. It bases on well-known projects like CherryPy and SQLObject together with new components like Kid Template and Mochikit JavaScript Library to provide you a powerful platform to develop your web projects. I really enjoyed it!

Once web development for python was all Zope and Plone related. However these technologies have a big learning curve that makes beginners uncomfortable, unlike Python, that makes user life easy from beginning yet providing power to experienced users. I'm an experienced python programmer and already did Perl/CGI and PHP programming for years, but could not learn Zope or Plone in one afternoon. As I'm not a professional web developer, I don't want to spend more than one afternoon just to learn the framework basics!

Then various frameworks came, most of them were incomplete in some sense and they were all incompatible, most of them have great features but some limitations or design goals that made me avoid them.

I don't know if it were due to Ruby on Rails success or if the python community agreed in a coincident timeframe, but this last year two pupils were born: DJango and TurboGears. Both are really well documented and have useful tutorials and screencasts. The first were born from inside a web-publish site and have really great administrative features, however it does not extensively use other projects: it have it own Object-Relationa-Map, template system and more. The last doesn't have so many ready-to-use tools yet (version 0.8), but by using existing tools like SQLObject and CherryPy it's evolving really fast and have promising features to come in version 0.9. That's why I opted for TurboGears.

TurboGears allows you to develop a MVC web applications, you just need to code your views using Kid or other template plugin (0.9 will ship with others, like Cheetah), code your controllers with methods that should be accessible from web-server being exposed and your models using sqlobject. It's so versatile that you may use most of your controller methods to return not just HTML/XML but also JSON (without changing the source code!) that, associated with Mochikit, makes it extremely easy to code dynamic HTML like AJAX interfaces together with plain HTML!

Version 0.9 also includes:

Identity system
handles permissions and authentication
CatWalk
General model browser and editing system
ModelDesinger
Design your SQLObjects in a visual, WYSIWYG fashion
Widgets
Avoid writing forms manually. This handles validation and presentation to you!
It's a great framework, but it's a bit unstable until 1.0 comes. I plan to publish some examples as soon as I have them :-)