Lost in a Sea of Web Frameworks


So I’ve been trying to learn Python and have successfully written a couple small scripts. For the couple of small web sites/services I’ve written, I used CherryPy mostly because I know someone who is active in the CherryPy community.Coming from PHP and ASP.NET, Python’s offerings of web frameworks are a bit confusing. Here is my impression of the general landscape of the 3 platforms:

  • PHP – A language which survived without widely adopted frameworks for many years. While many frameworks are gaining popularity, most major PHP applications are their own framework.

    Examples: Drupal (a CMS) and Horde (a framework and suite of web applications)

  • ASP.NET – The web framework bundled with Microsoft’s monolithic .NET platform. Supports multiple languages and even implementations (go Mono!). A few alternative web frameworks exist for .NET (Castle Project), but it seems much more popular to just build components on top of ASP.NET.

  • Python – While I’m still learning a lot about Python, it seems Python has a wide variety of frameworks which range from a complete web application stack including database and kitchen sink (Zope) to just a widgets toolkit (ToscaWidgets) or just an HTTP/object-dispatching framework (CherryPy).

Then there are the various Javascript/DHTML/AJAX client side frameworks which can replace the interface portions of the above platforms and frameworks. It seems to me these UI frameworks have caused PHP-sans-a-framework to remain popular because the server-side code becomes a simple data broker for the complex UI widgets.

Python is obviously a bit different than PHP and ASP.NET. While using a framework seems the norm (unlike constantly rolling your own in PHP), there’s no 1-framework-to-rule-them-all like ASP.NET.

Luckily my web applications have been very simple, so CherryPy by itself has worked fine. I may even go the hackish route of just using a Javascript UI framework to keep my Python code simple. I’ve been trying to learn a little more about TurboGears and ToscaWidgets as well, but so far I haven’t needed a full framework.