Why Use A Web Framework?

My experience with Python web frameworks has run a little backwards. I started off by building my own, then moved on to Paste and WSGI components, web.py, Tornado, and finally Django. At S7, we’ve settled on a combination of Tornado and Django, though Tornado may get usurped by something built internally, and there is still exists some healthy skepticism of Django.

There are many obvious reasons for using a large framework such as Django, and some not so obvious. The obvious are listed under their feature set, and I’m not going to talk about that.

The less obvious, but more salient points in my opinion are:

  1. Well documented.
  2. Understood by a large number of people.
  3. Designed by experienced engineers.
  4. Maintained by the community.

Documentation and maintenance effort are generally under allocated, and so the scope of a framework that you might build internally is a direct function of the amount of resources you can devote to it. Given the size of the Django community, it’s unlikely you’d be able to build, document, and maintain a framework of the same scope. And you shouldn’t — because it’s unlikely the choice in framework would vastly affect an engineer’s productivity anyway.

Django has also made many design decisions that a less experienced engineer may botch. This is an especially important problem to avoid if you are a company of young hotshot programmers. There is a tendency to build everything custom. Like cooking, you may know what the ingredients are, but you are not guaranteed that the food is as good or nutritious.