Django 1.0 Web Development Review

Published 14 Oct 2009 | Under

Django Web Development

Django development evolved

For a while now I've been itching to try out Django, it's one awesomely powerful framework, simple and elegant. So thanks to a good friend, Ayman Hourieh sent me a copy of his recent book "Django 1.0 Web Site Development" to review and boy is it a cracking read.

Don't over complicate

Unlike some other books I've read he doesn't try to tackle all the bases at once and then put together the pieces afterwards, he sets out a clearly defined roadmap at the start and builds upon each chapter as you progress; reinforcing what you've learnt with quick review sessions at the end of each chapter.

Starting small he introduces you to the world of Python, it's origins and how & why the Django framework was created. Ayman then runs you through a couple of example lessons to gain your experience with it's fundamentals. This is important as it increases your confidence with the framework and settles you into progressing more, and not pushing you too far too soon. Let's face it with anything new confidence is a big factor and it's important to not try to do too much or embellish too far with details that are little use, and Ayman nails it.

All are welcome

Python is one of those languages, like Ruby or PHP, that doesn't restrict you to a specific o/s and right away he shows you how easy it is to install and setup on Linux / OSX or Windows; you've got to love things like that, good stuff.

Structure

Once done we setup Django, create our first "hello world" project and then review what we've learnt before continuing. Next we go ahead and build a simple social bookmarking application (think of a simple Del.icio.us), we learn about Templates and building up our Database Schema; summarising as we progress.

Next up we handle User Registration. Django comes with a set of default packages which each provide a specific form of functionality to your app, authentication and user management is baked in, others like tagging can be installed as required; it's up to you to decide how you use them.

He bases each chapter on real-world processes, securing your app, tagging, expanding the data schema and adding AJAX functionality with the awesomely powerful jQuery framework. Building on social networking concepts he shows you how to add voting, sharing bookmarks between users and allowing those users to comment on each others posts; before you know it you've got a pretty sterling app going.

Admin and RSS

Next we delve inside Django's built-in administration interface, restricting users, group permissions and crafting the interface more to your application's liking.

We then look at advanced searching and adding RSS news feeds to our application, binding those to our users so each one has their own channel. By using Django's Q objects you can quickly gain a solid understanding of it's Database API and Ayman's examples are pretty easy to follow here.

Deploy

Once we've built a friendship model and an email system, Ayman shows us how to bake in internationalization. This is not a new concept if you've used other frameworks like Rails or CodeIgniter, but he lays it out so easily that the task of translating the phrases is the only headache you get; and being agile we don't get past deployment without putting together some fixtures and automated tests so we have confidence in what we're giving the public.

Conclusion

All in all, for $39.99 (24 quid), you get an easy to understand roadmap that teaches you a good set of fundamentals and takes you from a basic app to something really powerful. At a stretch you could probably complete the app in a week, after which Ayman gives some decent pointers for how to improve it. Weighing in at 250 pages it's perfectly balanced to give you the proper start in this awesome framework.

Great stuff, well recommended