Blog

Why PHP is gaining on JAVA

I’ll be brief with an illustrative example based on my own real facts:

Once upon a time there was a guy (me) interviewing a candidate to a software engineer position in my previous company.

After an hour of asking hundred of questions, questions about design patterns, architecture layers, technology comparisons, availability, XP or not XP, the difference between the goodness and the badness, why caterpillars becomes butterflies and so on, and tired of having really elegant answers to whatever I was asking about, finally occurred to me the definitive question:

In your opinion… what do you prefer in terms of web, php or java?

After, well, some seconds, the candidate answered to me:

PHP

I saw an smile on my face thinking about the response and why not java. Of course, I immediately ask to him in order to understand why PHP

Why?

Easy (he replied), PHP was designed to the web from the beginning… JAVA was just adapted to the web.

Well, I remember that I stammered ”well, …uhmm, ehmm”, but finally I was not able to discuss about that with this argument on the table.

I’m a confessed JAVA developer, but I promise to you: I - WAS - NOT - ABLE - TO - DISCUSS - ABOUT - THAT… Do you?

2 Responses to “Why PHP is gaining on JAVA”

  1. The argument that A must be better than B because A was designed from the beginning for a particular purpose is a false argument. It may be true that A is better than B, but that is because it is actually better, rather than because it *should* be better.

  2. Java Sucks says:

    The reason PHP is better than Java is quite simple: Clients don’t have to install crap on their PCs to do useful stuff with a website. And web server operators don’t have to install crap to run a web server (’Servlets’ are an incredibly stupid name but, then again, IBM never was very creative - they are barely still in business…hmm…). In addition, if you need some sort of specialized functionality, Flash seems to be more widely distributed than Java and those little bits of missing functionality are almost always available from Flash. YouTube, for instance, is done with Flash, not Java. (YouTube is owned by Google and Google is in business…hmm…)

    Which brings me to my second point about Java. PHP may have come after Java, but PHP is more up to speed with the web than Java. Java is ancient tech. It was ancient tech the moment it came out. No one liked it then. No one likes it now. Java should have been burned at the stake a LONG time ago instead of browser developers constantly paying lip service to it by implementing it in every browser under the Sun. What’s that? The Sun died? That’s right - Sun Microsystems went belly up and had to be bought by Oracle to survive. The next time you beat a dead horse, visualize Java and it will make the dead horse beating that much more enjoyable.

    PHP, on the other hand, is pretty damn close to perfection. The development team tries to stay relevant with the latest trends while maintaining a consistent core. PHP 4 sucked. PHP 5 is awesome. PHP 6 is in the pipeline. We’ll see how that version goes.

    Meanwhile, where is Java? I haven’t seen a Java application on a website in months. Anywhere. People use Flash these days if they need something super-dynamic. Flash can talk Javascript and Javascript can talk AJAX (jQuery, etc). And AJAX can talk to PHP (or Flash can talk to PHP directly - whatever floats your boat - a zillion different paths to the same solution).

    I don’t know of a single company that uses Java. At least none that are still in business. Or any business that truly matters. Found an article in 2005 from Sun saying that Java is “on the rise”. They had to sell to Oracle this year to keep the ship afloat. Java is dead. Move on.

    (All of this from someone [me] who learned Java and saw it as a crappy language from the get-go. I’ve seen every incarnation of Java from the first installation of that horrible bloatware on my 486DX to the latest Core i7 and it still sucks the same. Too many weird oddities in the language to make it useful. Too many hacks required to make stuff work. Cryptic error messages. Having to compile programs. Debugging anything was and likely still is a nightmare - especially when compared to today’s IDEs like the Visual C++ 2008 IDE.)

Leave a Reply