IBM Backs PHP for Web Development
Christopher Reimer writes "C|Net is reporting that IBM will be getting behind the open-source language PHP for its WebSphere server software and tools. From the article: 'Big Blue's public commitment to PHP is significant because the company has the technical and marketing resources to accelerate usage of the open-source product.'" Evidently PHP is indeed becoming more popular.
I have to ask the same question. It seems to me that PHP gained popularity as an *nix/c-Syntax alternative to Microsoft's ASP. Like ASP - quick, dirty, cheap, and not-compiled. But for all its faults, ASP at least had Option Explicit .
:-\
However, the language seems lend itself to a lot coding flaws - explicitly defined variables, variables that can do quadruple duty as scalars, arrays, maps and references with no visual cue as to what they're for, abuse of global variables, no standard library resulting in 5+ functions that do the same thing - that result in unreadable, obtuse and convoluted code.
(Before somebody flames me about such things being a matter of "taste" - there are academic studies out there regarding human comprehension of coding styles. These things are quantifiable. That's why it's called Computer Science - not Computer Art)
Yes, bad progammers can make even the best language suck, but PHP really gives you free reign to be more sloppy than most. Yeah, a lot of php apps look slick (phpNuke, phpAdmin, etc) but under the hood they're a mess.
The term "Websphere" could mean alot of different things. It is IBM's branding for all of their middleware and web related products:
This is their J2EE application server. It plays in the sam space as BEA's WebLogic App Server, JBoss, etc. It's the cornerstone of their Websphere line and comes in many sizes and flavors, running on anything from a single server, to clusters of servers, to minis, to the Mainframe.
This is their primary J2EE development tool. It's built around the Eclipse framework IBM developed and released to open source, so their are also tons and tons of other tools that plugin to WSAD.
A portal and colaboration server built on top of WAS. WPS also includes a lot of the technologies that grew out of their Domino platform.
IBM's Message Oriented Middleware foundation. (Formerly MQSeries)
EAI
B2C
mobile connectivity
... and on and on for about a hundred products. One of the few products not branded "Websphere" is their web server, an Apache distro, called simply "IBM HTTPD" or "IBM HTTP Server".
After moving away from Java, I couldn't be more pleased with the flexibility in PHP for web development and even shell script replacement.
It's concise (none of this System.out.println.pretty.please() funny business), the documentation is stellar, it plays nice with many different technologies, and I don't have to objectify and type-cast anything I don't want to. PHP 5 has all the object love and forced typing I need - and the great part about it is that its there if I need it. PHP also has a extension repository PEAR, and a slick templating engine, Smarty.
Sure, it 'lends itself to coding flaws', but it also lends itself to flexible web development and very quick development cycles.
Just because you put your code monkeys in front of Visual Studio or Eclipse *does not make the code any cleaner.* You can't force people to write clean code (which IMHO is an art). More 'structured' languages might even cause dummies to write even more workaround code. And while OOP is really great, I've seen folks who objectify projects into oblivion.
Don't buy in on broad-generalizations like the parent and check PHP out. PHP is on the up, and IBM (along with many others) are noticing.
I've written applications in both - and here's a difference no one talks about. When you open up MS's ASP environment, all that great GUI stuff is there and it's pretty easy to get going. Then as often happens in a development environment, you need a quick script to munge a long list of field names. Is ASP your first choice? It wasn't mine, because I couldn't find a way to get input into/out of it from the command line. So I whipped up a temporary web page with a text box to do it. More overhead than I wanted to spend for what should be a 2 minute job given an editor with macro key abilities.
Then a couple of years later I built my first app in PHP. The first thing I noticed was how easy it was to script from the command line. Since I'm not a perl junkie, it was real useful for small scripting jobs. I'd use a shell language for this, but fankly, I'd rather poke a fork in my eyes.
The next thing I noticed in PHP was I needed an modern editor (the free download doesn't come with an IDE), so I bought one from zend.com for a couple of hundred bucks. It's getting better, but like ASP, it too has no macro key ability (maybe I'm wrong and someone will tell me?), and other nits I'd pick given the chance.
But the big discovery in PHP was that all my ASP data-type problems magically went away. Hours and freaking hours I spent debugging situations where an int was returned from a DLL and ASP string'ed it, or vice versa. There were byref/byval issues I recall as well. We had to build test local harnesses for all our middle tier ASP components because these problems rendered ASP too lame for a debugging platform.
But my original point is really that PHP is useful along a continium of the problem space. Need a quick script? Need a nightly job that cleans up your app? Need web pages? PHP works well for all. ASP, from my experience, hits one for three.
- The Kessel run is for nerf herders. I can circumnavigate the entire Central Finite Curve in a lot less than 12 parse