ifacethoughts

PHP’s CGI Goodness

There were a couple of posts last week which brought out the CGI goodness of PHP. PHP has been bashed a lot, by language lovers and by web lovers. However, PHP is still the most popular P in LAMP today.

So PHP earns this unique reputation of being continuously beaten but also being responsible for most of the widely visited sites on the Web. Ian Bicking digs under the covers and brings out the reason for this. In spite of PHP, as a language, not being the best, still offers the best solution for deployment and hosting on the Web. It is not just one reason, but the whole package that PHP provides that gets picked up. I think the sandbox feature that PHP provides is the one biggest responsible for a low barrier to entry and lesser punishment for experimentation, and also for a wider availability of the skills. No wonder that, even if I personally like Python for Web programming, I end up working more on PHP projects. And I am saying this without any regret, which perhaps means that I do acknowledge these features of PHP.

It is also true that PHP builds everything in. And like the author says, it might be a terrible decision for a programming language, but it perhaps serves better for the Web programming tasks. I remember this dialogue with a friend where he felt that PHP was the easiest to experiment in.

A bigger question to ask is whether other languages can do what PHP does. It might not be very easy, because as Ian says, unlike others PHP was built for Web. It might be easier to focus on the benefits and achieve those, even if the means are different. PHP, in spite of its not-so-beautiful syntax, no inbuilt object models or recommended best practices, has proven that you cannot ignore practical aspects, like deployment, if you want to really get used.

Discussion [Participate or Link]

  1. Jayanth said:

    Hi Abhijit,
    I guess the reason for PHP’s popularity is that it was built ground up more for the web than for other purposes. With today’s challenge of getting everything online, from office documents, to games, this would fit in nicely if done well. However PHP can be a harrowing experience if the set of people working in your project are not disciplined enough.

  2. Abhijit Nadgouda said:

    Quite true Jayanth. It is not that it is only PHP in which you can write sphagetti code, it is that you have to be consciously aware of it and try to avoid it.

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
My bookmarks

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.