incorporating dejaMoo: best of breed bull…

Django Advocacy

Breaking down doors.

Django Advocacy

Having engaged in a spot of workplace Django advocacy over the last few months I figured I would summarise a few of the key points here.

First a note on choosing a framework.

Choosing a framework is much like choosing any other software in that you look for established (or simply stable) software which is available at an agreeable price point, and evaluate it against your requirements (whatever they may be: licensing; standards; support; language, etc.). However, shopping for a framework differs from nearly all other software shopping because the philosophy of the framework developer(s) quite necessarily comprises a large part of the evaluation process.

Why?

VoodooPad is one of my favourite pieces of consumer software and I use it every day, but in coarse-grained terms the extent to which the philosophy of the developer (Gus Mueller) affects me is probably limited to the usability and usefulness of the software. (Subtly, of course, Gus's philosophy is all over it, but we're not talking nuance here.) Likewise, I use lmxl every other day, and again the effect philosophy of the developer is of limited scope.

VoodooPad is a tool contained in your application toolbox, but it could be replaced by the desktop edition of MoinMoin. Lxml is a library contained within your application, but you could easily use ElementTree without making any great leap.

A framework, by and large, is a container for your application. The philosophy of the framework developer affects the design of the object model, whether to use an ORM, where and when and what patterns are employed, code reuse, templating, interoperability and determines if I use convention or 13 verbose, but highly customisable configuration files. In fact, the philosophy of the framework developer extensively determines the architecture of your application.

Normally it's none too trivial to migrate your application between frameworks and often you just start from scratch. Philosophy matters: choose wisely.

Python

Django is a Python web application framework. Python is a dynamic, object oriented programming language used by the likes of Google, YouTube, Yahoo, NASA, Microsoft, Compaq, IBM, Nokia, Canonical and ILM just to name a few. Python is a mature technology deployed across thousands of critical systems. Best of all, Python can be learned in a few days. For more Python advocacy see Pythonology.

Modular

Django is a beautifully integrated framework, yet is modular by design. By default you get an ORM (sufficient for most projects, albeit slightly underpowered [getting better all the time]), an MVC framework with a very well designed template engine, and pluggable middleware for caching, authentication and transactions etc.

Just want the template engine? Use it in isolation. Don't like the template engine? Choose another and bolt it on. Need some middleware? Write it and plug it in.

Django encourages modular development of your projects too. Projects are a collection pluggable applications e.g. a blog app, contact form app or inventory search app, wired together (by configuration) to create a website. Templates can be defined (or overridden) at the project level. For example, that one "Contact Us" app can be reused across many sites, seamlessly integrated with the site design.

As an aside, the DRY, application as a component philosophy of Django would make it an ideal framework for CMS development - that is, if you believe the world needs yet another CMS ;)

Ease of use

Django is dead easy to learn. New team members can have their development environment configured and be productive at the end of their first day. At the end of their first day! -- even if they have little or no Python exposure. Why? In part because the simple things stay simple and in part because the hard things are no harder than they absolutely need to be, but most of all because Django is incredibly well documented.

Documentation

Most commercial software projects would be envious of Django's documentation. Installation instructions are clear and concise, but the ultimate hook for new users is the 4 part tutorial.

Tutorial part 1 covers project initialization and structure, building a domain model and ORM API. Part 2 covers the automatically generated admin site (when you get a chance read the code for this; it's instructive), part 3 introduces views and templates and part 4 extends upon these concepts with form processing and one of Django's ultimate time savers, generic views.

I'm quite certain there are thousands of web sites in the wild built solely on the knowledge gained from the tutorial.

In addition to the tutorial, Django's reference documentation is simply outstanding and is notable in that it keeps pace with the development version of the framework. If that's not enough, there is the forthcoming book - you could say it's the tutorial on steroids.

Stability

Django is currently pre 1.0 release, however it each point release (0.9.6 is current at time of writing) has been carefully considered and well executed. It's important to note that backwards compatibility, is not guaranteed until after the 1.0 release. I have found developing against the SVN version quite sustainable, even for production, as it's the intent of the committers to keep trunk as stable as possible. This approach also goes some way to smooth any giant leaps the framework takes as it progresses towards 1.0. Your milage may vary.

As an aside, it must be tempting for the developers to slap the 1.0 moniker on the framework as it is genuinely good enough right now. The restraint and craftsmanship shown in not having done so is indicative of the focus on quality over the project as a whole.

Django is also very much in the wild: See here for a list of Django powered sites.

Community

Not too loud or hype prone, but equally not backwards in coming forwards, the Django community is strong, vibrant and committed. Visit #django on freenode to see what I mean, or else catch up on some reading via Django's community page.

License

Django is distributed under the liberal BSD license. 'Nuff said.

And finally...

This post barely scratches the surface, but potential Django advocates should find (as I did) that the framework stacks up quite nicely (warts and all) when compared with the opposition.

For the uninitiated: Nothing speaks out louder for the Django framework than the framework itself, so if you haven't had a look already, stop reading blogs :P and check it out.

[Update: 21 Jun 19:00]: A mate just pinged me to say I should have mentioned increased productivity and testing as they're key points too. He's right of course, but I figure any framework worth it's salt should increase productivity. Testing is a cinch too!

Comments (0) § Posted by in on
AddThis Social Bookmark Button

Comments are now closed.

Tweet Tweet

Stuffs

Thanks for dropping in.

This is the personal website of Cam MacRae. Any opinions expressed here are my entirely own, and have jack to do with my employer.

It's the product of a little elbow grease, the news.ycombinator noprocrast feature, and a healthy dose of Django.

A Django site.

Tags

  1. D (1)
  2. SOA (1)
  3. ajax (2)
  4. apollo (1)
  5. architecture (1)
  6. bemused (1)
  7. blogs (2)
  8. carsales (1)
  9. collaboration (1)
  10. css (1)
  11. django (9)
  12. duels (1)
  13. email (1)
  14. erlang (3)
  15. findability (1)
  16. flex (3)
  17. folksonomies (1)
  18. funny (2)
  19. geek (20)
  20. google (3)
  21. innovation (1)
  22. iphone (1)
  23. javascript (4)
  24. jython (1)
  25. life (5)
  26. lighttpd (1)
  27. lisp (1)
  28. mac (1)
  29. macbook (1)
  30. marketing (1)
  31. open-source (1)
  32. oracle (2)
  33. python (6)
  34. rails (2)
  35. ruby (1)
  36. silverlight (1)
  37. skitch (1)
  38. startups (4)
  39. tech (21)
  40. twitter (1)
  41. usability (1)
  42. web20 (6)
  43. work (3)
  44. yui (2)
ten1000miles.com | Aussie Blogs |  Feed

Creative Commons License This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 Unported License.