Bob Ippolito (@etrepum) on Haskell, Python, Erlang, JavaScript, etc.
«

TurboGears

»

TurboGears, "the rapid web development megaframework you've been looking for", has just been released. It's the first web framework (for any language) that includes MochiKit in its war chest. TurboGears looks cool because it leverages a lot of very good existing software and wraps it up in a very usable manner. It does not have NIH syndrome. It has excellent documentation and a very nice 20 minute wiki tutorial that covers the whole stack (all the way up to "AJAX" with MochiKit!).

There's a lot of good first impressions to be had with the technology:

  • It's not afraid to take advantage of Python 2.4 features (decorators)
  • Despite the fact that it has a bunch of dependencies, installation is painless as it's setuptools-based (eggs!)
  • It uses Kid for templating. XML in, XML out. This means your templates look like your output and can be tested (for validation, look and feel, etc.) with just a web browser. A web developer's dream come true! If you've used TAL (or ZPT) before, it's similar.
  • SQLObject is a pretty good ORM layer, with support for SQLite, MySQL and PostgreSQL. What's especially cool is that you don't actually have to use it, so if you have another way of doing your model layer you really don't have to change.
  • The model hooks up to the view by returning a dictionary. These dictionaries are either passed to Kid to render a template, or can be returned to the browser as JSON. There are plenty of other possibilities here (XML, etc.). Perfect for MochiKit integration!
  • It comes with a script to make a project using the default template, so a new project is not a blank slate. This is especially useful for new users.
  • CherryPy knows how to reload code and templates when they change on disk. This is probably my biggest pet peeve with some of the "competition". Boy do I hate restarting servers!
  • It supports all the important platforms (anything unix-like, including Mac OS X, and Windows).

It seems to be quite a complete package. I'd be a little more excited about it if it was built on top of Twisted, but it's probably possible to plug that in to an extent using CherryPy's WSGI support.