Java vs. PHP – the Essential Factor

SoftSlate develops a Java shopping cart application so you can imagine where we stand on this debate, if debate is the right word. Preference? Opinion? Does there need to be a winner or loser here?

The argument has been made that Java is more scalable. The counter-argument has been made that PHP is scalable too and after all, Facebook is a PHP application. The counter-counter-argument has been made that yes, Facebook is a PHP application, but they had to do a whole bunch of stuff to make it scale.

On the other hand the argument has been made that PHP is easier to learn (this may explain why there are hundreds of PHP shopping carts and not nearly as many in Java). And maybe more importantly, faster to develop prototypes with, which is very important indeed, when you think about how valuable it is to be agile. I will also note here you are reading this on a page created in PHP.

Which language do you prefer? And what’s the essential factor for you?

I’ll speak for myself: apart from all its other strengths, Java feels easier to keep clean. By way of illustration, may I present here my family room:

Family room

It’s a mess of toys as you can see, and it’s almost always like this, except for those days we cajole our two kids into picking up. On those days, the pristine conditions seem to last for about an hour, if we’re lucky. But during that hour, oh yes, it feels almost … civilized.

You’ll note the cubbies and various boxes and such. These are artifacts of an organizational system. The system is there, it’s just only being partly-used. I think Java is much like our family room. You can still make a hell of a mess if you are careless, but at least there are lots of cubbies and boxes there for you (ie, standards, design patterns, and frameworks), if you choose to use them.

Does this mean PHP does not have cubbies? No, it has them too, but I tend to think they might not be as big or fancy. You might have to construct some of them yourself. And (maybe more relevantly), fewer of your neighbors use them, so it’s not embarrassing when they come over and discover that you don’t either. It may be easier to play with all the toys, but it’s easier to make a mess with them too.

About David Tobey

I'm a web developer and consultant based in lovely Schenectady, NY, where I run SoftSlate, LLC. In my twenties I worked in book publishing, where I met my wife. In my thirties I switched careers and became a computer programmer. I am still in the brainstorming phase for what to do in my forties, and I am quickly running out of time to make a decision. If you have any suggestions, please let me know. UPDATE: I have run out of time and received no (realistic) suggestions. I guess it's programming for another decade.
This entry was posted in Programming. Bookmark the permalink.

2 Responses to Java vs. PHP – the Essential Factor

  1. Rich says:

    I prefer Java because, last time I looked, there are things that I can do in Java that I cannot do in FTP. An example would be an FTP server or a multithreaded application.

    Also, I don’t think that PHP is easier to learn. I think more people go into PHP development because it’s trendy.

    Also, once you put together a library of Java routines I think that you can program in Java just as quickly as you can in any of the other “trendy” languages.

    Another thing, since I do a lot of JavaScript and JavaScript is similar to Java it’s just easier for me to stick with Java.

  2. Jack says:

    I also choose Java too, I was starting with PHP (develop many many website shopping cart, CMS…) but I always feel not good, I dont know why. I join to Java software company and found the heaven, more more clear for me to do, the error happen I know why, where, how it come…

Leave a Reply to Jack Cancel reply