Developing with Django

Posted by on September 9, 2012 in Django | 0 comments

Developing with Django

There’s more and more information being circulated about Django, the Python-based development framework which has come out of left field to take the web application development world by surprise. I’ve now had the opportunity to work more than full time with it on a routine basis for the last several months, and I’m finding it more than palatable. Here, I’d like to take a few moments to outline the things I love about Django, and to highlight some of the things which are maybe a little less than great.

What I Love About Django

1. It’s Python Baby!

First, Python forces a programmer to indent their code properly, which is awesome. For years as a developer I’ve been struggling through enormous heaps of other peoples’ code which are not always well formatted, and it’s made life a bit difficult. PHP and Javascript, the two mainstays of web development are completely relaxed, and the results can be horrifying to try to parse. Also, Python a highly logical language, with definite best practices for optimal development. The Python way seeks to eliminate redundancy, relying on a type modularization which allows import methods akin to globalization. If a Python module is initialized, it and all of its contents are callable from anywhere.

2. It’s Well Documented

I’ve worked with WordPress quite a bit, and I appreciate its online documentation, but there are certain parts of the API which are barely documented. Not so Django. The guts of the thing, and how they interact to form an integral framework, are laid bare by the documentation. Not too daunting a task, as the Django framework — true to the Python credo of writing a thing once and recycling it everywhere — is pretty tightly designed.

3. It’s Super Extensible

Define a model, create a supporting form, cobble together a view, and run it out via a template. Anything you can think to do can be handled programatically and piped to the glass with a relative bare minimum of coding overhead.

One of my more recent, ongoing projects has Django up and running in Jython on Apache Tomcat. This kicks open the doors to an entire universe of Java libraries.

I could really just go on and on.

What I < Love About Django

1. Things Are Named a Little Wonky

For instance: The insistence upon using reserved words for Django objects (i.e. USER, which is reserved all over the place).

2. Its Error Output

I mean, I’m not saying I want the task of writing a module to parse Python stack traces into something intelligible, but aside from being prettier, the Django errors are often so non-informative as to be more infuriating for their visual appeal.


Still to come…

More on Django

I know I’ve been slacking on my writing recently, but aside from the odd email reply, text message, or tiny snatch of PHP, nothing but Django has flowed from my fingers for a couple of months. I’ve learned a ton, and I’m looking forward to sharing it with you here. Stay tuned for articles on Django gymnastics.

0 comments