Responding to Infoworld Did PHP kill the Java radio star?
Zend’s CEO, Andi Gutmans, claims that PHP is disrupting Java. Meaning that PHP has gotten a significant toehold and is dislodging Java from its position as the granddaddy of server-side web applications frameworks[1]. I take the word disrupting in its modern sense of disruptive technology – a technology that significantly differs from the standard paradigm and whose effect would have been hard to predict, based on the “rules” of the standard paradigm.
I am a long-time Java-user (9 years) and I agree that PHP is a real contender in the web applications sphere… and would like to make some additional observations.
I suppose that if you don’t know what PHP and Java are, you might consider this article total gibberish. So let’s fix that. If you’d like to read up and learn about PHP and Java, try Wikipedia [PHP] and [Java] articles for starters.
Here’s additional elucidation…
PHP: … is a programming language that is embedded within web pages (on the server) whose purpose is to embody the “logic” of the web application and ultimately emit HTML pages. When PHP statements are executed they do things like connect to databases, make computations, and modify and format the information for display on the web page. Ultimately the output is HTML (and javascript) like any other page. PHP developed as a scripting language, and one characteristic of scripting is that the server “interprets” (or compiles) each PHP page from scratch each time the page is requested by a web browser. That’s each time a page is requested. That makes for quick development and modification of PHP pages, but it’s not very efficient from the standpoint of server efficiency.
Java: Similarly, Java language statements can be embedded in web pages (on the server) to connect to databases, read files, and modify and format information for display. Java provides (runs within) a framework[1] that precompiles its programming language statements to a compact form which can be very quickly executed by the server. One common framework is Java Server Pages [JSP] running under the control of systems like JBoss or Tomcat. The other big difference, compared to PHP, is that Java pages (JSP pages in my case) are “persistent” and once a page is compiled and then loaded, it stays in memory and can be executed super-quickly for thousands of viewers without recompilation or reloading – while PHP pages have to be compiled for each of the thousands of viewers.
And the bottom line is that Zend, the company, provides an “optimizer” and its own framework that vastly improves the performance of PHP pages, thus making PHP much more competitive with Java. So Andi is right. PHP is really disrupting Java’s hold on the web application market.
Working in the cloud[2], as I do now, I have found it’s easier to find a cloud supplier who provides a PHP right-out-of-the-box solution than a Java solution. Or maybe it’s just easier to configure PHP (like on the Ubuntu Linux servers I use at Slicehost). But Slicehost is promising us a Java solution soon. Probably more important, Google has announced they’re workin’ on a Java solution to be positioned within their App Engine and I see more and more clients using Google Apps every day.
So what’s the bottom line? PHP has really come up the curve, especially with the Zend Framework and Zend Server in the picture. I’d say that development progresses a little faster in PHP than in Java – while you’re developing the database and other support – but when you’re developing the PHP or JSP pages themselves, the two approaches get pretty similar traction. During development and debugging, you can make a change to a page and instantly view the result of your change. Once you’ve deployed the solution and there are thousands of users, then the Java-based app is probably a bit easier on the server and has greater capacity.
[1] A framework is a set of cooperating programs that together provide underlying support services for a computer application (“application” in the sense of a computer program that gets some big task done). I’m talking about web applications here – meaning applications running on big servers in the cloud and used by people through web browsers.
[2] Cloud computing is “computing as a service” without the customer having to worry about servers or other hardware – you just purchase as much computing as you need.
Leave a Reply