This blog is an experiment in creating software through wsgi middleware, built on top of paste. It aims to try and create useful components of software that can be interchanged with other applications.

Before you tell me that your framework already does that, when was the last time you were able to take a django app and plug it into zope. Or how about taking a drupal plugin and sticking it in wordpress. Most frameworks have their own notion of what a component or plugin is, and how to insert your own into the mix, and reuse them in different applications. For that reuse to happen however, the catch is the application also has to use the same framework.

WSGI tries to solve that by using one simple interface. Middleware components can then be reused among any environments that support wsgi.

While wsgi middleware solves certain problems really well, some simple problems become complex. In particular, certain types of integration among various components becomes difficult. Here's a great post describing some of the issues with creating your entire application through middleware. If you find yourself adding tons of stuff in the environment, and then bad touching certain headers to affect functionality further down the stream, you might want to reevaluate your approach.

On the flip side, as new standard "wsgi headers" begin to emerge, then this effectively becomes a new api. Here's a different post describing "wsgi components". As more headers become standard, components that honor these headers properly can be interchanged.

Nevertheless, I've found that when wsgi middleware works, it works *really* well. The potential reuse among components is very great, for the reason that it's incredibly easy to plug the components into the pipeline. Additionally, many of the python frameworks are starting to converge. Most of them are even starting to use paste. It's become an exciting time to be a python web programmer.