Monday, March 23, 2009

Religious wars

You would have figured by now that I would know better. 20 plus years in IT, programming everything from assembly to PHP. But, no, I still got sucked in to the vortex of a religious war of technologies. At first I didn’t know what to think. It was a typical customer call. Showing them the presentation of Zend products and I was wondering where their thoughts were. Then I tripped. I mentioned that one of the key features that PHP had and Java didn’t was it’s divided personality of Procedural development and OOP. The Java guy in the back of the room reared his head and exclaimed “That’s not true!” And, he was right. Java does have a model that is more forgiving to the typical RPG programmer. So, if Java has that loving and forgiving model, why haven’t all of the RPG programmers learned Java?

You would think the legendary burger flipping ad would have motivated enough folks. Not so much. RPG is still around. IBM continues to invest in it. And, it’s looking more and more like Java every day! So why the struggle? For years I have felt that PHP is a much more forgiving language. Not as rigid and structured. It hearkens me back to the days when I used to burst forms in my dad’s data center. They had a System 3 and a couple of COBOL developers. My Dad was getting frustrated that it took several days for a COBOL developer to put out even a basic report. Punching the deck, turning around the cards, bursting the print: It all took time. Then an IBM SE (Software Engineer, for those who were wondering) came in and told my Dad about a new macro language that would put out reports in a fraction of the code required for COBOL and in record time. My Dad took the plunge and headed down to IBM downtown for a week of intensive RPG training.

The other COBOL developers warned my Dad. They said: “George, you really should mess around with toy languages like that. COBOL is Strategic, COBOL is enterprise and besides, it supports a structured programming model.” My Dad considered what the other developers said. And then continued developing his reports in RPG. The productivity gain was unbelievable. He was happy and the owners of the company were getting information faster than they ever had before. RPG evolved over time from a Macro language in RPG I that replaced the old FARGO machines and RPG II used by the System 3 to a full blown structured programming language in RPG III on the System 38 and RPG/400 and RPG IV. Not to mention ILE that just kicks the whole structured thing up a notch: “BAM”

Today, I feel that I am reliving the same religious war that my Dad endured. I listened to people who have been fed the Java Kool-Aid and regurgitate the same FUD about PHP. Yet so many websites and business applications are written in PHP. I wanted to describe why I think PHP is gaining in popularity. It all centers around the desire to create. PHP is a blue collar language that gets stuff done. It’s OK to sometimes write a piece of procedural code just like its OK to sometimes use the logic cycle to crank out a report. If that is all you need, then have at it!. Certainly OOP has its place. Many hands can make light work and with so many i5 shops have 1 or two programmers that the luxury of designing a monolithic Java architecture just isn’t in the cards. So a little PHP can go a long way!

The community is another reason. Sure, Java is Open Source and quite possibly about to become another IBM asset. But the reality is that Java became open source a little too late. PHP has been open source nearly since its birth. Many people in the community have grown up with PHP and still many can adopt it as if it were still young. It’s cool to be working with PHP in the open source arena and there is a far reaching camaraderie that envelops the members like no other technology save Linux.

But the last reason I wanted to mention is purely the organic growth of PHP. We recently updated a slide in one of our presentations that describes the top 10 web sites by traffic. This is estimated and tracked by the Alexa group. When I started with Zend four of the top 10 websites by traffic were running PHP. Today, six of the ten are running PHP and there does not seem to be any loss of momentum. Those six include: Yahoo, YouTube, Wikipedia, Blogger (which I am using for this piece), Facebook, MySpace, and Yahoo Japan. It’s OK if you want to combine Yahoo and Yahoo Japan as number eleven is a Chinese search engine called Baidu which is also written in PHP.

No matter how you slice it, PHP is running a significant portion of the web. It was developed for the web and by the community to be a powerful and fast way to get applications developed. Sounds a lot like the early days of RPG to me!