Friday 21 September 2012

Build Scripts

Having worked on a number of large build systems, mostly based on Ant, I am convinced they are not a helpful direction to go in.

The problems with Ant for example are legion:

  • Gardener effect - Great whilst the build system expert is present, but when they move on, it gets dumped in the lap of someone who might not give it as much love.
  • Tendency to grow - Systems growing organically is desirable in Agile development. An overgrown build system is however a pain to maintain.
  • Never Flexible Enough - Especially with Ant, we are constantly finding that the build system does not do exactly what we need it to and changing it is often awkward.

I could go on, but you get the point. What is the alternative?

Maven seems like a helpful option with its industry standard tasks and dependency resolution. I feel though that it is just a better Ant. That strikes me as a good starting point, but is at risk of suffering the same fate as Ant.

What is the alternative? Build it yourself.

  • Everyone can maintain it - But better than that, if you write it in the main development language then everyone can become a build system expert too.
  • Testable - Using the same testing framework as your production code means you can make sure the build system does what it says on the tin.
  • Expressability - How much extra faff do you need in Ant to conditionally compile some code? If you develop a light weight and sensible DSL for the building system, then you can express concepts like that in a lot less complicated, much more readable way.

No comments:

Post a Comment