James Tauber’s talk about Pinax at DjangoCon is a really great look at Django’s killer feature: reusable apps. Pinax is basically a collection of reusable apps — some of which were built for Pinax, and others which are independent of it — that allow one to put together a site very quickly (especially if your site is centered around social networking, as that’s much of what Pinax provides at this point). The basic concept is to separate bits of functionality (friend relationships, commenting, tagging, voting, registration, etc.) from what James calls the “domain object.” The domain object is what makes your site unique. For flickr, it’s photos. For Newsvine, it’s news stories. For Cork’d, it’s wine. If Pinax can provide all the non-domain object bits, all you have to do it build your domain object, and you’re set. Even if you’ve no interest in writing Django apps, it’s a good discussion of modularity and how this stuff works when it’s done right.
I was also surprised and excited to see that the approach I’ve taken with Savoy. While Savoy is more content management oriented (and Pinax is more focused on social networking), the basic structure of the two projects is very similar. Savoy has a set of third party apps it pulls in, as well as a set of “core” apps that are required. On top of that are “contrib” apps that are all optional. So, you simply install the core apps, then pick and choose which contrib apps are appropriate for your project, and you’re off to the races. I’m working to make all of these apps as reusable as possible. This is an ongiong process, and chances are the first will release won’t be as reusable as I’d like. But, pluggability will always be a primary goal. Finally, you can of course run your own apps alongside Savoy’s apps. Some apps even have hooks to integrate your own apps where appropriate (for example, the aggregator app, which runs my tumblelog, will aggregate content from any model of your choice, not just those that Savoy itself provides).
If you’re interested in building a social sort of site, or how best-of-breed reusable Django apps are built, definitely check out Pinax, and James’ talk about it.
No one has posted any comments on this entry as of yet. Perhaps you’d like to be the first?
Post your comment