Matt Legend Gemmell Modesty is Lying

Mac OS X Cocoa and iPhone Development Services available at Instinctive Code.
Favorites icon
Favorites for iPhone
Speed-dial with style.
Mac OS X Cocoa and iPhone Developer for hire

Other Pages

Categories

Posted
6 October 2006 @ 11pm

Categories
Development, Tech

Tags
, , ,

Django

I have a new job (as a Web Applications Developer) here in Edinburgh, about 5 mins walk from my flat. Most of the sites we make use Django, a web applications framework which uses Python as its implementation language, and I’m recommending you take a look at it.

A few of the features Django offers are:

  • Effective object-relational mapping (you can specify your model schema in Python, and it will automatically create both the necessary tables in your database and also an API you can use to manipulate your model).
  • Fast (lazy) model access (the dynamic API manipulates the queries, which are only then finally run when you access the results).
  • MVC paradigm, with hierarchical templating.
  • The whole “batteries included” philosophy of Python; i.e. what you want to do is probably already supported.
  • Pretty much zero-code generation of web admin interfaces to edit your sites and related objects; i.e. a CMS free with every site.
  • Cruft-free URLs; in fact, choosing pretty URLs is a central component to the Django workflow.
  • Comprehensive and always-up-to-date API reference free with every site (not just Django’s own stuff; it also auto-documents your models and any added tags etc you’ve created yourself).

Even if you didn’t understand what the fuck I was talking about in a couple of those points, read on anyway, or go look at the actual documentation and tutorial. You’ll get it straight away, I guarantee it.

It will work fine with Dreamhost, and you can easily install it on your Mac to try it out (it has its own internal test server and works great with Tiger’s pre-installed version of Python, or you can run it via mod_python in Apache 2.x, or via FastCGI with Mac OS X’s default Apache 1.x). I installed and configured a copy on my PowerBook (using the internal test server) in about 5 minutes.

Django is by no means the only option out there, but from my exploration of it, it’s good technology. It’s even worth trying if you’ve never seriously coded in Python before (which was more or less true for me a few weeks ago). Hop on over to the site and read the introduction and the first 2 stages of the tutorial (even if you don’t install the framework) to get an idea of how it works. Its design philosophy and development methodology really speak to me, and in many places it’s loaded with the kind of elegance that appeals to me as a Cocoa developer. Seriously, set aside an hour to have a look.


3 Comments

Jimbo
9 October 2006 @ 11am

Hey man… yeah seen your earlier recommendations to Simmo.

I’ll definitely have a look at this - been using Joomla which has a great dev community; but it’s a bitch to get things where you want it on the page and a bit mind boggling with the Section/Category/Content/Static Content when you show it to whoever you are building it for (and ultimately who then maintains it)

Never used Python but I’ll give anything a bash - especially if it’s relatively straighforward.


Neil
10 October 2006 @ 10am

Matty G, good to hear you’re still alive!

Don’t see you much on MSN these days. :( Fancy getting a drink in the ‘Burgh sometime next week to catch up?


Matt
10 October 2006 @ 1pm

Sounds good mate; I’ll text you to sort it out. Re MSN, I’m not sure yet what the script is at my new workplace regarding IM clients, so I’m erring on the side of caution at the mo…

EXCEPT GOOGLETALK VIA GMAIL HINT HINT HINT


Leave a Comment

iLife-style controls source code RoundedBox source code updated