Monday, January 19

Picking a Python Web Framework

A big reason I decided to work on this current project of mine was to learn new things. For that reason I had pretty much settled on using Python on the web server side - it's a programming language with lots of support and mindshare, and happens to be pretty fashionable right now too (which probably means it won't be once I get to grips with it).

There are many frameworks for creating Python-based web applications. After reading up on them all the two I narrowed my decision down to was the ever-popular Django and TurboGears in its latest and bleeding edge version 2 guise. Since I had come as far as I could merely reading about them, I decided that the best way to proceed would be to spend some time actually playing with them.

I first played with Django. I have to admit that it was a pleasure to use: the tutorial made sense, everything installed and worked first time, I felt that I was learning and could imagine how I could leverage it to do what I wanted to do.

TurboGears 2 was a bit more difficult to come to grips with. The documentation was out of date, the install broke a few times and I had to join an IRC channel to get some help and I felt like it was a general struggle to get to grips with. That said I could see how it offered more potential in the long run, having including JSON libraries, widgets and AJAX support.

This pretty much reduced my decision to the following question: do I want to to get on with things now simply and easily only to possibly reach a head at a later date, or invest in something with a steep learning curve that will allow me to do almost anything I wanted?

With time at stake I've decided to go with Django. I think I'm at a stage in my project where progress in the short term is more important than in the long term and I also think it's important that I'm actually enjoying what I'm doing. That's not to say I don't appreciate either - in fact there would have been a time when I would have relished the learning challenges TurboGears brings... Perhaps I've just become lazy in my hey day.

EDIT: It seems that there is a third option; that of Ruby on Rails. Ooo. Time for another tutorial I think.

No comments:

Post a Comment