The “Square Wheel blog”, previously available at WordPress has moved to a new site – http://squarewheel.pl
Archive for the ‘Uncategorized’ Category
A new blog
January 30, 2009Reinventing the square wheel again
June 2, 2008There was a recent post on pylons-discuss about creating a python web framework not based on WSGI, but on higher-level abstraction – WebOb.
Well, I’m doing some research on web applications for my MSc thesis, where I’ll need a framework that is simple and stays off my way – in other words does as little to possible. I’d have used CherryPy, but I found that even it is doing too much. So, with such a suggestion on discussion list I’m trying to build a framework around WebOb.
It’s simple with a layered architecture – each layer accepts an dictionary with a few objects in it (especially webob.Request object) and returns webob.Response. The topmost layer performs application-specific tasks, while lower layers add functionality – much like WSGI middlewares. And because WebOb is a helper for WSGI, I can use any WSGI middleware.
Because of that I’m not wasting time writing things like session support – I just put beaker into the stack and wrote a simple wrapper (7 lines of code).
Perhaps I’ll release the code when it’s usable. Maybe it’ll just serve as a proof of concept – but at least I’ll have some environment for my thesis-related research.