PHP Handwringing

Rather than rehash all of the points made in this article by Jeff Moore, I'm going to just link to it instead: Why is PHP Popular?

Probably the number one reason I would say that PHP is so popular is how easy it is to use.

Stop right there - don't start in with any "Yeahbut" statements having to do with how easy web application development is with J2EE/Zope/.NET/etc "Once you get the hang of the framework".

I'm talking about how easy it is for the frustrated web designer/JavaScript programmer to start fooling around with. I mean how much easier does it get than

echo "Hello, World!";

Compare that to Sun's own HelloWorld example in Java:

class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}

That's why PHP is so popular.

Where PHP does start to fall apart, though, is when you start building large, complex applications with it - the fast and loose coding that makes it so easy to learn initially makes it easy to lose track of variable types, and the lack of exception handling in a large application starts to make things hairy.

I've been using PHP 4 for the better part of four years now, and I think I'm reaching the limits of what I can do with it in the context of the types of projects I find myself working on... but I don't understand why "real programmers" are puzzled by the language's popularity. It's easy. You don't need a comp sci degree to do powerful things with it. (Never mind about how language x does the same thing more elegantly/consistently/robustly. It's easy in PHP. You can pick up the theory stuff as you go along.)

I wish enterprise languages would take a cue from PHP's excellent online documentation, which provides helpful text and useful example code for nearly every function, and links to other manual pages somehow related to the current function or subject you're looking at. User annotations also provide helpful errata or further code snippets to make the docs even more helpful.

But perhaps that ease of use factor is what bugs "real programmers" about PHP... call it nerd machismo. Although it looks like I'm moving away from PHP as a primary programming language, I hope I never become one of those surly J2EE/.NET types who love to hate the language that enabled me to replace the word designer with the word programmer on my resume.

Syndicate content

Twitter

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key