Django Power!

Over the past month I’ve been dabbling with Django by starting to convert the prototype of Mail Tally (PHP) into a useable site powered by it.  So far I have to say that I love it!  The template inheritance is mind blowing, and the ease of mapping URLs to views just blows my mind.

It’s embarrassing to say that I’ve never used a proper PHP framework before.  At my day job we have an in-house CMS that has some MVC leanings, and prior to that I’ve done a lot of work in WordPress.  It’s refreshing to write web apps with a framework that makes it fun.

Choosing a Python Web Framework

If you follow this blog at all, you know that I’m a PHP programmer.  Specifically, I like to work the LAMP stack.  Lately though I’ve been getting the itch to grow my Python skills and learn a new web framework.  After some searching about on the internet, I came up with two Python web frameworks that look promising: Django and Pylons.

Django and Pylons are both Python web frameworks that encourage rapid development of web sites using the Model-View-Controller design pattern.  They both are similar, but also have enough differences to warrant some discussion before choosing one over the other.

From my research and experience, Django is good because it’s easy.  It’s easy to set up a site and the administrative interface is built up for you.  The only issues people have is that it doesn’t allow a great deal of customization, and sometimes Django hides what is going on from you.  To some people this is desirable, to others it isn’t.

People seem to like Pylons because it’s extremely flexible.  For your models you can use SQL Alchemy or some other ORM, while for your template engine you can use Mako or any other kind that you’d like.

Mainly because I like to have flexibility, I think I’ll start out with Pylons.  If you’re interested in learning more about the differences between the two frameworks check out this and this.