KillerSites Blog

Why the Java community dismisses PHP.

February 19, 2005

More and more there are grumblings in the Java community – the language is showing its age and Java nerds are starting to look elsewhere … slowly.

In their search though, I have found that Java nerds tend to ignore or dismiss PHP … instead they look to Python and marginal languages like Ruby as the potential alternative.

WHAT’S THE DEAL?

I have to ask myself, why are Java nerds ignoring one of the most popular languages in the world? Why are they ignoring a technology endorsed by IBM, Oracle and used by Yahoo?

I think much of it comes down to Java elitism and false perceptions about PHP, it comes down to these points:

  • PHP is a scripting language that is easy to learn – Java elitism has a natural dislike for anything easy.
  • PHP has a procedural history that makes Java users snicker – despite PHP5’s full blown OO feature set.
  • PHP syntax can be a little inconsistent at times – this is true.

On the flip side, Java users seem to ignore some very important facts about PHP:

  • PHP is ubiquitous. It’s hard to NOT find a host that supports PHP.
  • PHP is fast and scalable – Yahoo proves that.
  • PHP easy learn, easy to write and is fairly concise.
  • PHP has a huge community where there are plenty of open source tools available.
  • PHP can be maintainable: there are database abstraction frameworks (PEAR DB), there are templating frameworks, MVC and other frameworks so that you can build maintainable scalable applications in PHP.

One argument you hear from the Java camp is that PHP is a web application only language … pratically speaking. This is indeed the case but what about Java? Most Java projects are web applications, Java on the desktop is but a small fraction of the Java work being done.

Ok, you have cell phone and other small device work, but the fact of that matter is that most Java projects are web applications.

Beyond Java

Bruce Tate wrote an excellent book (‘Beyond Java’) criticising Java and speculating on what the next big language will be. Not surprisingly, he spent little time on PHP.

Not to take anything away from the book, it’s really good. Nonetheless, from the perspective of someone who wants to make a living, it only makes sense to strongly consider a language that is so well established and easy to work with.

WHAT AM I DOING?

I think for the time being, when it comes to small and medium sized web applications, PHP can’t be beat. I have hung up my Java-shoes and now look to PHP for any new projects.

Stefan Mischook