There’s a wealth of both online and dead-tree texts covering Django and jQuery, however by comparison, there’s far less information covering the integration of both technologies so the arrival of this book is timely. I’m also always happy to see new books aimed at the more experienced Python programmer in a time when the rapid (and very welcome) growth in the adoption of Python has led to the recent publication of a large number of beginners’ books.
The second chapter gets stuck into the basics of jQuery and the constructs which simplify the implementation of Ajax. The third chapter then dives into Django with a tour of Django validation and a detailed discussion of validation in general. The remainder of the book builds a reasonably large web application with each chapter pulling together a good number of disparate features you’d want to provide in any self-respecting Web 2.0 application. Autocompletion, form validation, server-side validation, client-side and server-side search and login handling are all described and integrated into the application. Even the creation of a “favicon.ico” is mentioned to put a company logo on your users’ web browser tabs and make them look distinctive.
It quickly became apparent that this book is not a regurgitation of “the same old stuff”, rather it makes the effort not only to show you what to do, but also to discuss why you do something in a particular way and how you can improve on it, leaving the reader with a deeper understanding. For example, the book is quite happy to extend the provided Django classes where they fall short, and show validation of more unusual types such as GPS coordinates not natively supported by Django. Another example is the book’s excellent treatment of validation discussing cultural awareness and the suggestion that a “less is more” approach to validation can sometimes make sense.
var value = parseInt(newValue.toString());
field = value;
I acknowledge that you can never please everyone with your coding style and layout!
There are several parts of the book which deserve a special mention, however Chapter 11 particularly stands out. The topic of usability is one often brushed over in technical books in favour of delivering more how-to’s and code examples. The author devoted an entire chapter to usability, a chapter which I can only hope the authors of many web applications I’ve used might one day read.
I find it hard to characterise the author’s style of writing but I’d probably describe it as intellectual bordering on philosophical with a colourful vocabulary, a style which I enjoy but might not be to everyone’s taste. An amusing example of the intellectual nature of the book can be found in Chapter 2: “Prototypal inheritance is more like the evolutionary picture of single-celled organisms that can mutate, reproduce asexually by cell division, and pass on (accumulated) mutations when they divide.” I actually found this an interesting and useful analogy however it’s probably a little hard to relate to unless you remember your school biology!
In summary, I like this book. I like the the fact that it’s filled with gems of information you won’t easily find online. I like the colourful language and the interesting discussion around the concepts the author is conveying. Most importantly, this book is written by someone who has clearly developed real web applications. If you’re someone merely looking to get cracking on a project using Django and jQuery in the shortest time possible, then this book might disappoint. But then again, the online tutorials and references are there to get you started and this book can take over where they leave off.
Finally, the author strikes me as someone both interesting and accomplished and I look forward to reading other books he might have in the works.