Development Environments

Do your development in a virtual machine and end your deployment woes

For us web developers it's advantageous to have a completely functional local setup of the site we are working on. It means we can continue to work (at least to some degree) when the Internet goes down. It means we can work on the train. It means we don't need to wait around for our Systems Administrators to add an extension or new feature to the server.

When I'm concentrating on a particularly difficult problem, I like to pick up my laptop and go and sit in an unused meeting room where I can properly concentrate on the issue at hand - unplugged from the network - without distractions from colleagues, Facebook, Twitter or whatever the latest online fad is.

But having a development environment on your box is not without it's flaws. Windows users often end up developing on something which is completely different from their production environment. Mac OS X and Linux users have to basically learn system administration and install their environment with MacPorts. Not a bad skill to learn but often not all members of the team are capable of doing this without losing many man hours. It would be much better if one of your more senior developers could do this once for everyone.

This is where virtualization comes in. Virtualization is essentially running another Operating System like an application on your Operating System. Sounds like an overkill doesn't it? Well the benefits are pretty stark:

  1. You don't lose all those man hours as each developer on your team installs, updates and then reconfigures their development environment multiple times during the project
  2. You can better match the development environment to production environment. Run FreeBSD on your live web servers? Run FreeBSD on a virtual machine.
  3. New starters can simply copy the virtual machine (essentially a file) and start working straight away.
  4. When one of your key developers makes massive changes, he can just redistribute a modified virtual machine and everyone can start working again.
  5. Hardware failure? Bust hard disk - just copy the virtual machine

You can even continue to use your favourite text editor. Just setup a share between the host and guest machine. There are quite a few software options to run your virtual machine, but I'd recommend VMware. It does a sterling job. A free alternative from Sun is VirtualBox.