Tim O’Reilly has a way with words. In an “Ask Tim” post last July he described something that I think I’ve begun to notice since I started down the arduous path of trying to learn a scripting language (in my case PHP):
I’ve always believed that one of the most important things about scripting languages is that they (potentially) make a new class of applications more accessible to people who didn’t previously think of themselves as programmers. Languages then grow up, get computer-science envy, and forget their working-class roots.
Specifically, in the blogs, articles and books that I read I’ve sensed an antipathy towards—or perhaps dismissiveness of—PHP that is a bit like bourgeois distaste, like it’s not really quite as serious as other languages (such as Perl, the subject of O’Reilly’s post). This is a feeling and I have to confess that I can’t back it up with examples, though maybe now I’ll be more aware of them when I see them.
In any case, I’m definitely in the group whose members “didn’t really think of themselves as programmers.” I’m keenly aware of this each time I read something written by a programmer that is not a beginner’s guide on the subject. I came to PHP only secondarily through the flourishing WordPress (which has become one of my driving motivations since it’s such a fine example of the kind of application I’d love to one day be able to create). But I actually first encountered PHP when I was building a university web site and wanted to try my hand at Server-Side Includes (SSI) to display data like dates and times. Pretty simple stuff. The sys-admin told me that SSI was not enabled for security reasons and that I should use PHP instead. Then he furnished me with a few code examples that I could just drop straight into the HTML.
That was the beginning of a geek crush of Joelsian proportions, I’m afraid to admit. I just loved what it could do. The whole blogging/CMS thing has only confirmed that there is no going back for me. I had turned over a few times the idea of trying to learn Perl, but I didn’t really know where to start. With PHP I started before I realised what I was getting into, because it helped me to solve a problem that I had. As I’m learning I prefer to jump in the deep end with a code example or problem, and then go back over it to understand how it works, sometimes days or weeks later. This is how it makes most sense. Maybe its gauche but it works. And then, maybe someday when my ship comes in…
In a previous job, I had quite some exposure to PHP and MySQL running on Linux and Apache (LAMP). This dates back about 5 years so I can safely say that PHP has never been treated as a serious contender in its field. The same goes for MySQL. A telling moment was when I advertised for a PHP Coder – 80% of applications were under 21, 80% of those were either currently studying or had never studied at a tertiary level. 20% of the applicants tried in some way to change my development environment!
Why? PHP is, in my opinion, the Volswagen of scripting languages. It was developed for a specific purpose, embraced by a large number of users and has ended up being used for purposes far beyond its original intentions. For crikey’s sake, the first Porsche vehicles were modified VW just as some high traffic sites have used PHP!
Does this make PHP a good choice? No, not in every case. If you are an amateur (in the true sense of the word) or otherwise restriced by a tight budget, then you can make PHP do a lot of ‘stuff’. We had a fairly comprehensive online training and organisational assesment tool constructed. I’m not well versed in the current limitations of PHP, but there were some procedural and security based concerns during my time with it. But the biggest problem is that is not considered a serious tool by the industry. If you were trying to get funding for your concept, then this was a black mark against you.
I can get by in PHP and it is the scripting language that I am most proficient in, but to me is on the same level as BBC Basic. You can do some cool stuff with it for fun, but if you are seriously developing, then use something else.
What should you use? PHP. It is becoming more sophisticated, there is lots of free support but the kicker is AJAX. AJAX will shift alot of the scripting to the client and will result in applications with an improved user experience. Example: Google Maps.
Another excellent option is Ruby on Rails which aims to minimise the amount of code and configuration required in an application. The system is aware of each module and will facilitate communication if the conventions are maintained. Example Basecamp I especially like the idea of AJAX on Rails.
Finally, Apple’s WebObjects is also worth looking at for commercial applications. I was impressed by both the deveopment environment and time to deploy. I haven’t had a lot of exposure other than as a user.
I’ll leave it as an exercise for the reader to explore these ideas!
April 30th, 2006 at 7:23 am #
It’s an interesting perspective Dan. I read an startling listserv e-mail the other day about college students at Amherst requesting Rails. Amazing, not so much to think that they would want it but that they would be requesting it as part of their student web services. TextDrive has it covered, in fact it’s one of their big draw cards. I’ve heard similar (good) things about Segment in Australia. WebObjects I don’t know much about. One question though, do you see PHP and AJAX coming together in particular ways, or am I misreading your comment about that?
April 30th, 2006 at 6:23 pm #
Not an expert in this field, but that never stopped me from commenting!
I think that a LAMP environment will be a good way to deliver the AJAX technologies. Keep in mind that you still have the cons of PHP but probably don’t need to learn all of the dirty hacks (hopefully like trying to make PHP an OOL).
Also, my apologies for the post above – it is a severe breach of decorum to post a comment that is longer than the article!
April 30th, 2006 at 10:11 pm #
How hard is it to make your own LAMP setup? Can you do it on a crufty old Windows box if you format the hard drive? I’m itching to get busy with a Linux-Apache localhost setup to see how it works. Also, what are the major cons of PHP as you see them? You mentioned security before… Write away, make it long, show you care.
May 1st, 2006 at 1:06 am #