Entries Tagged 'Uncategorized' ↓

Popularising Django - Part 2

If you would have read my Popularizing Django post, you might know that I consider building a killer packaged app to be the best way to popularize Django. This is a post about what that app must be.

For PHP it was Wordpress and PhpBB. Both were free, very easy to install and came with every thing packaged. If you have followed the history of either you must know that they have always been plagued by security problems.
Assertion: Most users, even programmers, value ease of use and install over technical superiority. Case in point, Windows vs Linux.

For Rails, arguably it is Basecamp. This is a website people can use for free, and can see that building complex, rich and engaging applications is possible with Rails. With the build a weblog in 15 minutes, Rails already proves that building webapps is fast and easy.
Assertion: Killer apps need to prove easy things are easy, but complex things are possible.


Can a blog application be Django’s killer app? We have many, many Blog applications written with Django. If we build a technically better application than Wordpress, can this be Django’s killer app? Sorry, if you are still writing a Blogging app, (apart from personal use/learning), you are deluding itself. You can build an awesome application, but can you get Chris Pearson to designs a theme for your app for free. Wordpress’s three gazillion free themes/plugins make competing against them with a blogging application almost impossible. Same goes for competing against MediaWiki or PhpBB or Drupal.

The other end of the spectrum is building say a CRM as the killer app for Django. There is SugarCRM, but it is not widespread, and a technically superior solution can knock this off its pedestal. Of might be a open source project management application?
Yet with killer apps you want width of penetration, not depth of penetration. With a CRM you can get a few Rabid fans, but not an army of people who are tweaking your application everyday.

So what can be the killer app of Django? Are there still applications left which can have a depth of penetration, and are not yet in widespread use? Yes. A lot of people want to build a Social news site, and they are forced to use Pligg, and Pligg absolute sucks. Or maybe a social network app?

But I am most hopeful about Everyblock. Once the source for Everyblock is released, a ton of localities and cities not served by Everyblock would like to build such a site. Imagine a large number of Everyblock clones, and a million people hacking on Django. Never underestimate the power of large number of college kids tweaking small little things.

Five things I love about Django.

I posted five things I hate about Django, so as a penance, I will of course have to tell the “Five things I love about Django”.

The Admin interface rocks:

I have demoed Django to a fair number of People, and when you write a few lines in models.py, and then show the auto generated Admin interface, this is a jaw-dropping moment. Happened with me every time I introduced Django to someone. In Barcamp Hyderabad 05, people could not believe this was so easy, and asked if there was some more code behind this.

Of course Admin is much more useful than as a show off tool. When I am developing a new website I write the views to query the DB first, at that time the Admin is indispensable. And in many cases, just writing the Models, and tweaking the Admin is enough for me.

Documentation is comprehensive, available, and always maintained:

When I was looking around to learn a python framework, after search I has to choose between Django and Turbogears. Now after having used Django a lot, and Turbogears for comparison, I believe Django to be better. But this decision I could not have taken when I was just starting out. I choose Django because it seemed better documented, with tutorials more freely available.

Having the whole framework documented, from the most basic, to the more esoteric is huge time saver.

The community is extremely helpful:

Whenever I have asked, a question in django-users or on IRC#Django I always get helpful responses, and a lot of help. Few communities have this culture where, people with so much experience are willing to help out people who are just starting out.

There is a reusable app for almost everything.

Need to handle hierarchical data as relational data, django-mptt to the rescue. Need to handle voting, tagging, or registration. Well we got you covered.

Easy things are easy, and hard things are possible:

You just want to do as SELECT * FROM ... WHERE ..., just use Model.objects.filter. Ok, so your queries span a number of relationships, and you want to reduce the number of queries, use select_related. Or might be you want to model a relationship, which Django ORM can not, might be a little sql in .extra will help you? Or might be you have a lot of GROUP BY or UNION ALL, drop to raw sql in connection.cursor. Depending upon your requirement, you moved from the trivially easy to the somewhat hard.

Similarly with templates, you just want to substitute some variables. Use {% for ... %} and {{ ... }}. Or you want to do something difficult/custom in template, (and are sure that template is the right place to do this), just write a template tag.

Bonus

The development web server: When you are developing, not worrying about Apache, and any configuration, is a huge help. And the fact that pdb plays nice with web server is awesome, (compared to GAE servers which give a BdbQuit exception).