The No.1 i-Technology Magazine in the World !
   
 
Timothy Fisher

Search Box

 

About me

Timothy Fisher
Flat Rock, MI USA
blog.timothyfisher.com

View Timothy Fisher's profile on LinkedIn



Add to Technorati Favorites

Subscribe



Subscribe with Bloglines

Mailing List

Visitor Locations

My Java Book

My Tumblr

Blog Status

  • 3 yrs 23 wks 6 days old
  • Updated: 3 Jun 2008
  • 22 entries
  • 74 comments

Hit Counter

Total: 251,853
since: 19 Jan 2005

When Discussing Languages (i.e. Java and PHP), Look Beyond Your Comfort Zone and Learn Something New

posted Tuesday, 7 June 2005
Recently, I posted a discussion regarding my belief that there are more "cool" applications being written in PHP than in Java. As, I stated in the posting, I come from the Java camp myself, and through the posting I hoped to open the eyes of Java developers who see no value in looking beyond the Java world. I hoped that the resulting discussion via comments to my post wouldn't degrade into yet another Java versus PHP rant. Unfortunately, to a great extent, that is exactly what happened. Many developers, both on the Java and PHP side, took the opening to rant on how horrible, unsuited, lacking of quality, slow, etc.. the other language is. I found it enlightening that many of the arugments against the other language were exactly the same, i.e. the Java developers said that PHP is too slow, PHP developers say that Java is too slow. I took the liberty of deleting some of the comments because they were simply so childish and unprofessional in nature, as to be useless to the discussion at hand.

In further discussion with some who posted comments and others who read my blog, I began to realize that many Java developers are lacking in their understanding of how far PHP has evolved, and how similar in many ways it is to Java, from a developers perspective. For example, I wonder how many Java developers realize that version 5 of PHP brings full object-orientation to PHP, including
  • inheritance
  • constructors
  • destructors
  • public, protected, and private properties and methods
  • interfaces
  • abstract classes
  • static properties and methods
PHP5 also introduces a reflection API, very similar to what Java has, full XML support, SOAP support, exceptions and exception handling, and a whole lot more that I'm certain would come as a great surprise to many Java developers who havn't taken a look outside their immediate technology domain lately. Likewise, based on postings from PHP advocates, I am sure there is a great deal about Java that would come as a surprise to many of the hard-core PHP developers.

My point here is certainly not to suggest that we should all move from Java to PHP, or PHP to Java. Rather my point is to suggest, as some did point out in comments to my previous post, that PHP and Java are both very capable languages, each capable of being used to develop very powerful web applications. Yes, they each have their niches, PHP being with the hobbyist and small business community, and Java being in the enterprise and corporate community. Furthermore, I believe that developers can benefit from being aware of what is being done in other languages outside of their chosen language of expertise. Cross-polination can be a very good thing for both PHP and Java developers.

In this debate, people often have looked at some of the applications developed in PHP, which in many cases are very poorly designed and developed, by hobbyists or students without a background in software engineering, and jumped to the conclusion that PHP is a crappy language that leads to poorly designed and buggy applications. This is an invalid conclusion. Especially given the advances in PHP5, I would say that a developer is as capable of developing a high quality, well designed and architected application in PHP, as is capable in Java. Java developers tend to have a more professional, software engineering background, but given a pool of undereducated developers as exists in the PHP community, I am certain that you'd see just as many buggy and sloppily designed Java applications out there.

As a developer, don't bury your head in the sand and make childish comments like PHP sucks, or Java sucks. Instead, spend some time learning a bit about another language and see what you can learn from that.

Until next time,
Tim




1. jose left...
Tuesday, 19 December 2006 5:18 am

-Java is not the best programming tool. Its merely all about BALANCE. Especially how do you balance between Business Process and Technologies. Java does it all. PHP, perhaps solve the web problem 100%.

-For now, only JAVA community in this world emphasis and promote OOP, OO Archi/Methodology/Design and Design pattern. While PHP still enjoying their hobbies style. C# enjoying MS style. I don't use smalltalk anyway.

-10 years ago, someone... test out 72 CPU run concurrently..., also on..64bit platform. JAVA does it. Not sure about others. As for today believe it will go beyond the spec. Missing to MAR ..etc...

-JAVA is seriously focus on both business processes and technologies. Others are well focusing on hobbies.

-Give no Challenge. Non of the programming lang is well scale and extensible than JAVA. I was used delphi 3.0. Imagine MS VB --> .NET 1.x --> .Net 2.x -->???. As a application developer, I do not have time for that tough migration.

-Except Assembly, any programming lang can run faster than C++? No one, but believe so the application created by C++ full of bugs. Too fast to have bugs.

At last but not least, it is highly depends on what your organization business goal is.