It’s been a while since I last blogged about any technologies I’ve been playing with, so I figured I’m due for an update. I am going to split this into a two-part series: First I will play catch up and talk about the technologies that I’ve played with over the past 6 months or so. In the second article, I will go over some of the technologies that I’m currently exploring, or that I am planning to explore next.

Last Summer, I was contemplating getting into Python, which I had used briefly at my job. I had been more of a Ruby fan up until then, but I figured I’d give Python a chance and try to focus on a single scripting language. Therefore, I decided to explore some of the more popular Python web frameworks. I am not going to go into great detail here, but below are some brief notes. Also keep in mind that it’s been about 6 months since I’ve played with these, and that some of them are evolving rapidly, so the situation has likely changed quite a bit.

  • TurboGears combines several components (such as the SQLObject ORM library, the Kid templating system, and the MochKit JavaScript library) into a full web application stack. This seems very promising, but when I looked at TurboGears, its future appeared to be a bit uncertain, which is why I decided not to explore it in more detail. Since then, the team has announced that the 2.0 version is going to be based on the Pylons framework, but I am a bit unclear on what functionality TurboGears would add on top of Pylons (which itself combines multiple components into a web app stack).

  • Pylons: I really like the philosophy of this framework. Instead of a full, tightly integrated stack, Pylons mainly consists of a lightweight core that integrates with other best-of-breed libraries to form a custom stack. Instead of being tied to a built-in ORM framework, Pylons supports either SQLAlchemy or SQLObject. It also supports many templating frameworks, such as Mako or Genshi, and of course AJAX helpers like Prototype or jQuery can be plugged in as well. I really wanted to like Pylons, but in my brief experiments things weren't quite so easy to plug in as I had hoped, requiring modifications to various Pylons files (the instructions for which I had to hunt down on the web and in mailing lists). If it can overcome this limitation and evolve into a slightly more coherent framework where subcomponents can be cleanly picked "a la carte", this would be quite promising. However, it looks like the last release (0.9.6.1) was in September of 2007, so there does not seem to be much momentum at this point...

  • Django has been gaining a lot of traction and is being hailed as the "Ruby on Rails" for Python. In my brief experiments, it definitely seemed to have a lot of potential. Unlike Pylons, Django includes a full web application stack. It includes its own ORM support (pluggable ORM support would have been nice, as both SQLObject and SQLAlchemy seem to be powerful and mature) and a (deliberately) very limited template language, but other templating systems can apparently be plugged in as well. The documentation is pretty good (and the first Django book was published two months ago). It is however lacking some of the convenience of Rails that I have come to accept as standard, such as support for database migrations or easy deployment via Capistrano. The last official release (0.96) was in April of 2007, which is a while ago... Still, Django seems like a popular web framework in the Python community, and I might very well take another look at this at some point in the future.

This is where we get to the somewhat anticlimactic resolution of this post… Ultimately, I realized that I was happier working with Ruby and Ruby on Rails. Although Python is a perfectly fine language, I still prefer Ruby. And there are just too many convenient features that I had gotten used to in Rails (such as migrations and Capistrano) that made it difficult for me to pick one of the Python frameworks over Rails. Therefore, I decided to continue using Ruby and Ruby on Rails for my personal projects for the time being.

If you’re an experienced Python programmer, any of the frameworks above are certainly worth a look, though.

In my next post, I will go over some of the technologies that I am playing with right now, or planning to explore in the future.