Turbogears rocks


So I’ve finally started working on my first serious (serious might be too strong a word, but certainly non-toy) web app using [[http://turbogears.org|Turbogears]]. I don’t want to make this yet another Turbogears vs. X,Y,Z ([[http://rubyonrails.com|Rails]], [[http://www.djangoproject.com/|Django]], put-your-favorite-framework) post — after much reading (and a fairly low signal-to-noise ratio in a lot of such comparisons), I’ve decided that it doesn’t really matter. Functionally, almost all frameworks are more or less equal. Personally, I feel that for small projects, it boils down to personal taste.

For me, Rails was out from the start because I’m a Python guy. I’ve coded extensively in Ruby at one point, but I didn’t enjoy it as much as I enjoy coding Python and thats that. Besides, I’m heavily tied into some tools (such as matplotlib) that just don’t have comparable couterparts in Ruby (yet). To be honest I haven’t looked at Django in any depth, so I can’t make a fair comparison. On the other hand, I //have// been following Turbogears pretty much from its beginnings, although I haven’t tried it in any great depth either.

What it all boiled down to was that I had to pick one of them, any one, and dive in. Stick with it till I run into the meat, and then only I would figure out the strenghs and weaknesses. I chose Turbogears, because I really like the philosophy behind the project. Each of the component projects it itself quite mature. I’ve been tracking the mailing list of TG, and the community is great! There are a lot of smart people who evidently know what they’re doing.

I spent some hours with TG today and I’m really enjoying it. Here are some of the things that I thought were great, but which are not really highlighted as TG features. I think they should be emphasized a bit more, because they’re all pretty significant for any project:

* Extending Jeff Watkin’s [[http://nerd.newburyportion.com/2005/11/updated-identity-framework|identity framework]] was really easy and intuitive. I just derived my own User class from TG_User and thats it! I was all set for using identity!
* I really **loved** [[http://checkandshare.com/catwalk/|Catwalk]]. I mean, I cannot stress how useful it was for me. And how well it has been done. It is the perfect tool when you’re bootstrapping your database and testing your application. The interface is beautiful and intuitive, and even support SQLObject inheritance and joins!
* The entire [[http://turbogears.org/docs/toolbox/|toolbox]] is actually very useful, specially the WidgetBrowser. The things that I didn’t find of much use were the web based Python console and [[http://www.checkandshare.com/modelDesigner/|ModelDesigner]]. I think the latter is actually useful, I just haven’t gotten around to using it yet.
* Widgets: the new widgets are a great way for quickly putting together interactive elements on a page and even displaying data programatically.

So far I haven’t touched [[http://mochikit.com/|Mochikit]] at all, and barely scratched the surface of Kid and CherryPy, but with my experiences so far, I’m really looking forward to digging deeper. A comforting thought is that TG is highly flexible in terms of the components — people have used SQLAlchemy instead of SQLObjects, there are [[http://www.blueskyonmars.com/2006/01/06/template-plugins-for-everyone/|template plugins]] for Cheetah, Stan etc. So if I don’t enjoy this particular combination for some reason, I can atleast hope that my efforts into learning TG will not go to waste — something or the other will work out :-)

2 comments

Leave a Reply