I just finished listening to the Adrian Holovaty interview that I just recently blogged. I’ll post later today with a review of it, but, basically, it’s an excellent interview. Good questions, great answers.
Something that Adrian had mentioned in the interview (can’t remember what it was now) made me think about Django as compared to other Python web frameworks. Django is a unified framework. It has an ORM, a templating system, a URL mapper, and other miscelania. It is built together to solve the problem of building websites and web applications. Every piece of Django is built with the big picture in mind. Every piece of Django is also built with the goal of total integration in mind. While the components that make up Django can be used outside of Django, their re-use outside of Django was not a primary consideration in their design and development. Usage within Django was the primary concern.
This unification of components is one of Django’s key strengths. It allows the development of Django to get the big picture. It provides a framework where the components “just work” together. It provides a framework with strong accountability; if someone in the Django dev team breaks a component’s interaction with another component, they are accountable to the project they are working on to fix it. If you use various components from various sources and one of the components break another component, the accountability isn’t as strong. Yes, there is accountability to the community, but that isn’t as strong as the accountability to one’s own developement team.
Note that I have chosen to post this entry under an “Opinion” category. I believe that Django’s philosophy of owning the whole framework is the best way to go. Others, most notably TurboGears, believe differently. I’m not going to knock TurboGears (or anyone else who has taken on the brobdingnagian task of creating an open source web framework). I think Kevin has done a great job with TurboGears and I’m excited about the ideas that invariably cross-pollinate from projects like this. I’m just saying that if I were going to build my own web framework, I would choose the Django route. I would build it from scratch because of the particular set of benefits that come from that course of action.
This will likely spur another discussion of re-use vs. reinventing the wheel. I’m not going to discount all code re-use. I think it has its place. I also think that there are times when the benefits of non-re-use outweigh re-use. And I think Django is a perfect case-study arount that assertion.