PHP and Python hit prime time

It's strange to say that PHP (Hypertext Preprocessor) has only recently reached the point where it's ready for prime time, since PHP is already the most popular Apache module, running on almost 10 million domains (over a million IP addresses).

Python vs. PHP: Choosing your next project's language

Nevertheless, I've had some reservations about PHP until recently, especially with respect to potential security holes. Then I downloaded and installed the latest version of FUDforum, an open-source PHP-based Web discussion forum package I use for my nonprofit Web site, You can get an idea of what FUDforum looks like by visiting But what you should really examine is the PHP code behind FUDforum, which you can download from

At some point when I wasn't looking, PHP matured to a point where one could easily avoid the security holes that plagued some old PHP programs. This is especially true if you take an object-oriented approach to building your PHP applications.

Another good example of high-quality PHP programming is phpWebSite (, a Web content management system with several good snap-in expansion modules, including one that lets you create e-mail accounts for CommuniGate Pro, an increasingly popular drop-in replacement for Microsoft Exchange. The CommuniGate Pro e-mail and groupware server ( has a built-in Web interface for e-mail that you can integrate into the site you manage with phpWebSite.

The only thing I haven't yet seen done well in PHP is an open-source Web-based groupware application. Yahoo did a pretty good job designing its Web-based calendar (http://calendar. It even allows you to synchronize your data with a Palm device. But most IT departments are going to want to host their own calendars and groupware, and if there's anything that's been done in PHP that is of comparable quality to what Yahoo came up with, I haven't found it. There is at least one decent commercial offering, Internal Affairs (, and several open-source projects are in the works, a promising one being PHProjekt ( But none of the ones I've tried exploit the maximum potential of the PHP platform.

Love That Python

Of course, there's more to life than PHP. One of my favorite programming languages is Python ( It seems I don't go a week these days without someone asking me what I know about Python, so it seems to be gaining quite a following in mainstream IT.

Admittedly, Python is a love-it-or-hate-it language, but those who love it claim to be far more productive than with any other language. Being on the love-it end of the spectrum, I'd argue that it's a well-founded claim.

But Python hasn't gotten much past the promising stage for Web applications development. Until recently, Webware has been the best choice for Python programmers ( Webware is very nicely done, but its one weakness is that you need to run a Python-based application server in parallel to your Web server. In contrast, PHP integrates directly into the Apache Web server through a plug-in module.

There's nothing inherently wrong with the Webware approach, but it is difficult to tell how much overhead Webware will add to your applications. Webware simply hasn't been around the block as many times as comparable Java-based application servers.

Spyce is a newcomer to the Python Web applications approach, and it may not only push Webware off the map, it could also eventually give PHP a run for its money ( Spyce lets you embed Python code into your HTML in basically the same way you would if you used Webware and Python Server Pages. But Spyce doesn't need a separate application server to work. Spyce piggybacks off the Python or fast-CGI modules available for Apache.

I haven't done much more than a few minor exercises with Spyce, but so far I'm extremely impressed. The library of Web features for session management, cookies, forms, pooled variables and other Web applications goodies makes it surprisingly easy to toss together a prototype to see if it's worth using for your next project. If you even have a passing interest in Python, I recommend that you give Spyce a look.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about ApacheCGIHewlett-Packard AustraliaHPLinuxMicrosoftPalmVarLinux.orgYahoo

Show Comments