It’s hard to imagine how this industry would operate without open source software. The PHP language that I use to write software for the web is itself free software. Unfortunately, the quality of open source code written with PHP is relatively poor and inflexible compared to the quality of open source libraries that can be compiled into PHP as extensions. Consequentially my personal relationship to open source software is a hybrid scenario of, on the one hand, being deeply invested in open source tools that expand the language I program in, as well as having a commitment to turning out open source projects of my own to the community, and on the other hand, a healthy skepticism toward the bulk of open source software written in PHP. Part of this is due to the fact that, being the chief server side programming language of the web, freely available PHP code could well have been written by your grandmother (apologies to my GM, who happens to be a very savvy user).
I recently looked at five versions of a free class that provided some relatively trivial functionality that I wanted to include in our CMS, but didn’t want to spend too much time with. Some of them felt like they were the size of our entire core CMS library! I found plenty of frills that we don’t need (bloat which arises when a developer wants to pack their project with features to make it more than it needs to be), inefficient repetition of constants, and long procedures meant to do something that can be done in a few lines of smarter code (often meaning the developer missed some of the basics of the language). The fact that there’s a lot of garbage out there doesn’t imply that there’s nothing to gain by sharing open source code. In this case I had to study the scripts that I saw and develop my own (small) derivative, but if you are selective and critical when choosing to go with packaged code, there’s a lot of milage you can get out of other developers’ work. Fortunately, projects like PEAR (http://pear.php.net/) help to screen and collect useful code libraries and facilitate their distribution. Many other code archives just don’t fare so well.
I find that good PHP code is relatively fast and easy to write for any situation, because PHP comes with a wide range of libraries that automate most desired tasks, and the APIs are usually not very verbose. The places where I think open source software really becomes a feather in PHP’s cap are the multitude of extensions developed for the language as distinct open source projects (whether originally created for use within PHP or not). They are endless, and many of them are perfectly critical to writing a good web application. Nevertheless, there are areas where open sourced PHP code is also useful in the industry. I have felt that templating and caching are good examples of this, and created two open source projects for that. I aim to release another one that is designed to produce a powerful XML toolkit by adding a thin API on top of PHP’s XML foundation that vastly reduces the complexity of XML-generating code, making it more accessible to programmers at all goals and skill levels.
Some of the tools we have developed in-house and make freely available to whomever wants to experiment with them are available at http://technologies.whitewhale.net.
You can follow any responses to this entry through the RSS 2.0 feed. Respond to this post.