nemesis's Journal

Multi-platform advocates quality

Wednesday 5th December, 2007

It's a strange phenomenon, but when you have an application that's developed to target multiple platforms, you often end up with a product that is of a higher level of quality. The first example that comes to mind is Apache. It runs on a vast array of very, very different platforms, from Linux to Solaris to Windows.

When developing web applications, I actually develop under Apache 2 on Windows. However, my test and production environments are both Apache 1.3 on Linux. I often find that when faced with two ways of accomplishing a task, I select the one that's most likely to work on both platforms. Targeting multiple platforms means that hacks you choose to employ in development will most likely fail on one of the platforms.

Development in this way encourages the use of the standard API's that are provided to you (such as creating a temporary file), instead of "just throwing stuff in /tmp", as I often see in single-platform (Linux-developed) web applications. In this case, you can't even assume /tmp exists (since under Windows it'll probably be C:\Windows\Temp), or that you have permissions to write there. Similarly, shelling out to random Unix commands just won't work on Windows, or unices where the command doesn't exist (a web application I saw actually shelled out to 'wget').

A good way to raise the bar of quality in your project would be to have each of your developers working under a different platform. They probably all have their own preferred platforms (or even Linux distros) anyway. If one of your developers employs a hack that's specific to their own platform, you'll find out pretty quick. If someone decides that having a custom-compiled PHP is a great idea, they'll be quick to realise that trying to compile PHP on Windows isn't a pleasant task.

0 Responses

Leave a comment

Sign in to leave a comment!

Don't have a login yet? Get one now!