Practical Django Projects 151
Chromodromic writes "Apress's newest Django offering, Practical Django Projects by James Bennett, weighs in lightly at 224 pages of actual tutorial content, but trust me, they're dense pages. Filled with pragmatic examples which directly address the kinds of development issues you will encounter when first starting out with Django, this book makes an important addition to the aspiring Django developer's reference shelf. In particular, the book's emphasis on demonstrating best practices while building complete projects does an excellent job of accelerating an understanding of Django's most powerful features — in a realistic, pragmatic setting — and which a developer will be able to leverage in very short order." Read below for the rest of Greg's review.
This book serves an important function by providing progressive, useful examples of Django's role in the development of realistic projects. During the course of the tutorial you build three basic apps: A simple brochureware-oriented CMS, a complete blogging system (with Akismet spam protection and RSS feeds, among other features), and a social code-sharing site similar to that found at djangosnippets.org (with account signups, syntax highlighting via pygments, and bookmarking features — the whole enchilada). You may or may not find these projects
immediately relevant to your work or goals, but the projects themselves are really just platforms for delving into Django's nooks and general philosophy. It's an important point to make about the book especially, because though Django itself provides potent facilities for creating reusable code while preserving a high degree of flexibility, "magic" is kept to a minimum compared to some other popular frameworks. It follows that maximizing your knowledge of Django's inner workings through familiar paradigms is critical to making the framework perform to your best advantage. The book excels at accomplishing this goal.
Practical Django Projects | |
author | James Bennett |
pages | 256 |
publisher | Apress |
rating | 8/10 |
reviewer | Greg McClure |
ISBN | 1-59059-996-9 |
summary | A practical introduction to the Pythonic Django web framework. |
Along these lines, a lot of territory is covered in a short span. You're introduced to a couple of Django's contrib apps — code which comes with a normal Django installation and which cleanly plugs into your own application while remaining extremely customizable. After being ushered through a straightforward installation and database configuration, your first exposure to development is through the contrib app most frequently lauded in the Djangoverse, Django's deservedly well known admin system. But immediately, emphasis is shifted from the basic features of the system to the ways it can be customized. This approach of introducing a feature and then modifying or extending it is repeated immediately with Django's Flatpages contrib app, a very basic CMS which, again, comes with Django and installs with a single line of code and one command.
By the time you've finished the third chapter, you've built the foundation of a typical brochureware site, complete with a working search system and a completely functional customized admin with which you may modify your content using a javascript-based HTML editor (TinyMCE). Pretty impressive for 41 fast-moving pages.
The strongest feature of the book, though, is not the speed or facility with which features are presented, but rather the way these features are always demonstrated with a mind to Django's strongest argument: how easy it is to create reusable code, once you understand the framework's approach. As you move through the next four chapters of building the blogging system, the establish-modify-extend technique of presentation does a good job of working you through various standard Django features — generic views (a very important concept which is illuminated nicely), code organization, ORM techniques, template inheritance, and so forth — and you're smoothly shown the ways by which you will be able to incorporate much of the code you write into your future work. As you begin your last project, the code-sharing app, you've gotten an overview of both coding and workflow techniques which work best with Django. The final chapters reinforce everything you've learned while still introducing new material on library integration, form handling and the newforms library, and code distribution.
The overall approach is very effective, though I found I had to trust the tutorial a little at first in order to get the most out of it. The projects initially seemed somewhat vanilla, so it wasn't until I really focused on the organization of the material that I discovered the book's strengths. Now I wish I'd had this book years ago.
Issues? I had only one, really. The material presents itself as a tutorial suitable for those who are just starting out with Python. For example, near the beginning of the material the def keywork is pointed out as the way Python functions are declared, and similar kinds of notes and comments pepper the tutorial, somewhat unevenly, as well. While I appreciate the impulse to make the material as accessible as possible, I'm skeptical of the book's role as truly introductory at that level, although I could see some experienced developers, especially those coming from other languages, benefiting from these quick notes. But my feeling in general would be that if you're so new to Python that the def keyword is a revelation, you might be better off starting elsewhere before you dive into Django.
This is a minor point, though, and if you're willing to give the material the time, you'll appreciate what Django has to offer more and more with every page. The book maintains a brisk pace which I truly appreciated. And if you've struggled with Django in the past, or you've wanted to learn more about what to do beyond getting the admin running, "Practical Django Projects" is an excellent foundation for your Django education. I absolutely recommend this as the Django book I've found to be, by far, the most useful.
You can purchase Practical Django Projects from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Django Lessons? (Score:4, Funny)
Stupid question (Score:5, Funny)
What's django? Hardware? Software? Language? The fine article doesn't really clue me in.
Should I imagine a beowulf cluster of these? Praise our new django masters? Profit? Or pour hot grits into my pants?
Re:Stupid question (Score:5, Funny)
Boba Fett's dad.
Spoiler Alert... (Score:3, Funny)
Storm Dtroopers were imperfect clones of Django.
Dboba is a perfect clone of Django.
If you want to stop the Django process, you have to su to Windu and kill -9 Django
If you're looking for Dboba, try this command: cat \dev\sarlac | grep Mandalorian
Re:Django or Turbogears? (Score:4, Funny)
My company is moving toward using a unified codebase for our applications. Whether you're viewing an invoice in a desktop app or on the web, it's calling the same function (written in Python, using SQLAlchemy). Every time I've looked at using code in the filesystem from Zope, it's been overly complicated and problematic. Right now we use External Methods to make specific functions available inside Zope, but the side effect of that is that we have to restart the Zope process every time we want to run new code.
Another problem is that a lot of our pages take a long time to generate - think reports that take a minute or so. Because Zope is so minimally threaded, that means that other page views are delayed until those reports are finished. We use a pool of 8 Zope instances connecting to a Zeo server, with Apache sending queries to random instances to balance the load a bit. It's still too common for a use trying to view the front page to accidentally get queued up behind another using running "Financials 2004" and cursing at a blank screen until that report is done.
Add those together and you get an environment where most development is done over Webdav and is consequently a lot harder to manage with version control, 8 giant server processes are splitting the load, and changing a line of code can require a complete restart of the whole mess.
Yeah, we're ready to migrate.
what a coincidence! (Score:3, Funny)
Re:Stupid question (Score:5, Funny)
whats rails?
Re:Stupid question (Score:3, Funny)
Re:Stupid question (Score:3, Funny)
Duh!