Python app servers
It’s been quite some time since I could call myself a programmer. I just don’t write code very much any more. When you don’t write code day in and day out you get rusty real quick and, while I generally promote the “use the right tool for the job” concept for professional programmers, I look to keep my toolbox as simple and minimalist as possible these days. I’ve been pleasantly surprised several times in the past few months at how quickly I could solve some rather tedious text-wrangling problems with the tiny bit of python I know. Python is truly a fantastic example of a simple, flexible programming language that really enhances productivity and is well suited to a wide variety of tasks.
So when it comes time to build a little (or not so little) web app, how do I approach it? Do I bang out another set of PHP pages, or do I take more sophisticated approach? I’d like to be able to use Python, so I’ve taken a look at mod_python which gives me a PHP-like mechanism for generating pages. But it’s not used a whole lot and to be honest after an hour mucking about it felt like I was going backwards, not forward.
Enter the Application Server. As the name implies, app servers are nifty in that they let you build web sites similarly to how you’d approach a traditional software project. That is to say, you build an application - not a “page”. It’s an adjustment of mindset, to be sure, especially for people like me that have built many static web sites over the years and kept their excursions into PHP limited to simple templating systems. To be honest I’d pretty much ignored app servers as overcomplicated, slow, and largely uneccessary pieces of technology in the past. But I was mostly basing my dislike on the “enterprise” focused J2EE and .Net frameworks. Ever since I started playing around with Zope, the leading Python-based app server, I’ve had a change of heart. Thinking of a site as an application object with URIs acting as methods to call is very cool. Zope’s unified approach was much simpler than the Java .JSP/servlet/J2EE mish-mash I’d been exposed to in the past. Add in Zope’s acquisition and you’ve got a really powerful, quick way to build dynamic websites.
Zope, however, is still a rather large piece of framework. Just wrapping your head around what it does, let alone how you actually go about doing something, can take some time. You could also argue that Zope isn’t particularly pythonic. Zope is its own entity. Some would say Zope is its own religion… So I’ve begun looking for some simple app server / framework alternatives that I could use to bang together simple web apps in python. I want a framework with the following properties:
- It should be smaller and more approachable than Zope. I’m not sure how you do that. Perhaps it’s better docs? Fewer ways to do things? Perhaps a simpler architecture? Less features? Time will tell.
- It ought to be as stable and as quick as Zope currently is.
- Easy deployment. It should be easy to get it running, and it should be easy to integrate into other popular web front ends like Apache. Which means it should probably provide a standalone web server.
- Building a simple app should be simple, but the framework should scale up to mid and large sized apps.
3 python app servers have stood out as having an active user and development community:
So I’ll start there. Perhaps the end result is that I’ll simply stick to Zope and focus my limited time on learning that app server. Maybe I’ll use PHP for blasting out very small little database-backed pages. Or maybe even mod_python. In the mean time, spending a few nights to check out the python app server market seems like a good use of time if for no other reason than to get myself more familiar with app server methodologies. Maybe I’ll even be able to understand J2EE’s popularity some day. ![]()
About this entry
You’re currently reading “Python app servers,” an entry on VMUNIX Blues
- Published:
- Monday, October 18th, 2004 at 1:38 pm
- Author:
- mark
- Category:
- tech
1 Comment
Jump to comment form | comments rss