Ads by TechWords

See your link here
Receive the latest technology news and information.
Application/Web Development
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
Cloud Computing
View all newsletters




Privacy Policy
 

PHP and Python Hit Prime Time

November 11, 2002 12:00 PM ET

Computerworld -




Join
the online discussion about this column
.




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).
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, VarLinux.org. You can get an idea of what FUDforum looks like by visiting www.varlinux.org/forum. But what you should really examine is the PHP code behind FUDforum, which you can download from http://fud.prohost.org.
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 (http://phpwebsite.appstate.edu), 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 (www.stalker.com) 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.yahoo.com). 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 (www.internalaffairs.de/en/), and several open-source projects are in the works, a promising one being PHProjekt (www.phprojekt.com). 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 (www.python.org). 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 (http://webware.sourceforge.net/). 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 (http://spyce.sourceforge.net). 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.
Nicholas Petreley is a computer consultant and author in Asheville, N.C. He can be reached at nicholas@petreley.com.

Read more about development in Computerworld's Development Knowledge Center.



Jump to comments

Development

Additional Resources

Microsoft
Here are some of the key reasons why you would want to run Unified Access Gateway with DirectAccess.
Microsoft
Review how one energy firm tightened protection and simplified IT work using business-ready security solutions.
Sybase
In this white paper, IDC analyzes the role of next-generation mobile enterprise platforms as organizations seek a more strategic deployment of mobile solutions.

Learn the important issues you must consider before starting your next mobility initiative. Get your mobility white paper from IDC now, compliments of Sybase.

White Papers & Webcasts

Extend, Replace, or Convert; which is the best way forward for COBOL Applications?
Download this white paper, free, compliments of Micro Focus!  

The Workday User Experience Video
Watch Workday's Creative Director, Scott Lietzke, discuss the business-centered design philosophy at Workday.

Business Process Framework Demo
Learn about Configurable Business Processes and Calculated Fields. Watch Now!

Manager Experience Demo
Go beyond self-service solutions to perform more effectively. Watch Now.


IT Jobs