Why I chose Django over TurboGears and Pylons?-I
Dust still hasn’t settled over the Pythonic web framework wars. However, I felt it is necessary to chronicle my own thoughts, why I chose Django over TG and Pylons, two very good frameworks that deserves to have more followers.
If you happen to be the one in billion who had seen my earlier blog entries at pythonmag.blogspot.com, on the thought process I followed while planning to choose a web framework that fitted my bill, it might be easier for you to get the whole picture.
Let me give a small background of my development as a software developer.
Most developers go thru this kind of cycle somewhere in their career.
Programmer --> Senior programmer --> system analyst --> project leader --> project manager--> Vice President --> CEO.
In my case, my tryst with entrepreneurship and the fact that I had to drive business myself, the progress or rather the path was reverse.
CEO/Director --> Manager --> Programmer.
In the initial days, when we could afford to keep a team of developers I need to just direct them, tell them what I needed or what a client from whom I would have managed to grab some work needed. My role was pure man management or client management. I trusted my tech folks completely and left technology choices to them.
So if someone in my team came back and told me that something wasn’t possible, I blindly believed the person or assumed that the task in hand is something really complex, that I might require someone with such high skills, I cannot even afford hiring such a pro.
This was probably the biggest mistake I’ve ever done.
Circumstances force you to take up stuff, which you never wanted to do. I am a software developer, who was meant to be a developer, never wanted to be one, but now is forced to be one, and believe me, I’m enjoying it.
I am also enjoying the publishing/journalism consultancy and other stuff I do, but that’s another story.
By 2004, thanks to the effects of dot com boom, and investor money disappearing we were forced to move IQ Techmedia to a smaller setup, naturally a smaller team. I found myself, for a change dirtying my hands with everything from technology to office administration to even being an office boy (when the boy was on leave).
We were still getting enquiries for doing some software work, or there was enough work in-house which needed to be done or outsourced. There were absolutely no monies to outsource, and that is when I tried programming after nearly a decade.
I chose Python, for many reasons. One of them was that I had to learn Python sometime back to write a tutorial on that language. Frankly of around 20 programming languages I tried learning, the Hello World program worked the first time with Python!
I started of doing several house keeping works in Python, most of them were scripts that worked of my Windows PC, and managed some stuff for me. Gradually my confidence increased, and I could fairly write most small scripts that an article series on Python demanded.
Meanwhile my trusted friend and colleague Kishore who is a competent programmer in PHP was churning out web site after web site. I used to provide the logical flow for most of these sites, however, I felt that somewhere what I wanted in terms of cleanliness in approach or the real implementation of my thought process was missing.
That is when I thought its time I started dirtying my hands with some web programming. Somehow PHP was not appealing, as I was already so adapted to the clean, structured, powerful programming style of Python.
Then the search of web programming framework started. My advisor and software guru, Pradeep Gowda , is a man who constantly searches for new ideas and technologies. I am guilty of actually taking advantage of this friendship personally and professionally.
Pradeep had advised me to learn Plone, and I did try, but somewhere, I was getting a feeling that this is not what I wanted. Plone is good, but I am not good enough for Zope.
By early 2006, Pradeep started telling me about all the new frameworks that is being pitched in by Python folks to kill Ruby on Rails. Django was launched just around that time, and I tried it, but all the magic inside puzzled me.
Pradeep suggested TurboGears, and I liked it for a while. Then Pradeep suggested that Pylons is better and started evangelizing it, and I followed him into the Pylons territory.
I never had done any kind of web programming till that time. I was involved in making several small and big web sites since 1999. But I used to leave the programming part to better brains.
The problem with Pylons and to some extent with TG was that the documentation was just not good for an absolute web programming newbie.
In fact around April 2006 I just gave up the idea of learning web programming totally, and was involved in other projects.
Then again, I was speaking with Pradeep Gowda, and he said that Django is now better, and the 0.95 version rocks. I decided to give the framework a last chance, and it took me a good day to get the basic tutorial up and running.
I tried writing a blog application, but somewhere I didn’t feel inspired because there was no money to be made, and no one was breathing down my neck to get the job done.
In October 2006, Raghotham Shah, my former colleague and fire brand journalist who is now a deputy resident editor with Deccan Chronicle, was back in town from UK.
Raghothamwas looking for work at that time, but wanted to write on several topical issues and wanted a blog of his own. We had registered a web site called national-interest.com, but neither he or we had shown any interest in it.
He was anti Nuclean Deal at that time, and wanted a platform to publish it, and demanded that I put up the site immediately. Kishore was away on a holiday, and was left with no choice but do it myself.
So I created the web site www.national-interest.com on Django 0.95 working two nights continuously chatting with Raghotham over phone/messenger, and by the second day morning, we had a functional web site with minor glitches, a boring design, but lots of content the way he more or less wanted.
Today I would have put up such a site under four hours, thanks to an improved Django framework, and lots more experience.
The real deal as far as Django is concerned, is, it works mostly out of box. Documentation is world class, and now it’s even better.
I would imagine, there are somewhere between 10,000 to 20,000 coders out there who is played around with it. They have all contributed a lot and there is lots of code snippets available.
There are some dozen odd dedicated sites to django with enough reading material, and enough code you can borrow shamelessly.
Learning Curve for a Python programmer with some amount of web knowledge will be somewhere between five to 15 days. For an absolute newbie it can take more time, depending on the effort one needs to put in.
Now after nearly 25 projects on Django, I still must confess there are many things which I am yet to explore in this wonderful framework. Frankly, I have not had opportunities in terms of work to try some advanced features.
However I know I can rely on the user group to get most work done.
Will I ever try other frameworks? Yes, why not? I think after working on Django, it will be easier for me to work on a web.py or TG. I am just waiting for that opportunity.
If there is any open source developer reading this-- remember one golden rule. You want your product to be really popular, then spent more time on writing decent, simple to understand docs including tutorials. I know writing can be a very boring exercise, but newbies needs instructions, which the experienced lot can manage without.
In the next blog entry I’ll have more on the other features that endears me to Django.
Comment