How the hell do I build this?

I had a conversation yesterday with a friend and colleague about how his company should standardise their development environment for all Flashers – be they contract or perm, junior to senior.

He, like many of us, was sick of contractors building projects and leaving them in various states of repair. Required libraries or fonts are often missing, bits of code never even get checked into source control and, frustratingly, it is often unclear how to build a project. The makeup of Flash projects can vary from an FLA file/s full of timeline based code, to source code set up to compile under one specific, mystery environment.

The problem

You need to set some kind of reasonable standards, so that ActionScript projects can be easily verified, maintained and recompiled, not necessarily by someone with intimate knowledge of the OS, environment and the project – ideally even a developer without intimate knowledge of ActionScript or a copy of Flash CS5 and Flash Builder to hand.

The solution/s

There are obviously many ways to skin this cat. But, the way I see it, the best solution needs also to be reasonable, achievable by everyone and cost-effective for a typical digital agency. As such, the ‘best’ solution may not be the ‘ideal’ solution – by which, I mean an idealistic solution based purely on software development ‘ideals’.

Flash IDE

We have to start somewhere and, at the risk of a flaming, I’ll act as its advocate for a bit. There will often be a need for those FLA files knocking around and you won’t get designers building their banner’s with the Flex SDK. However, since the Flash IDE isn’t free, open source, understood by non Flashers and (with the exception of CS5) creates nasty binary balls of mud (namely FLA files), we’ll assume from here on in that we’re talking about compiling project with the Flex SDK.

Flash Builder

Adobe’s own latest development environment for Flash/Flex, built on the very popular and mature Eclipse is certainly feature-packed and already industry standard. But is it the sanest choice to enforce that everyone use this particular environment, just so projects are more maintainable? Will it work and, since it’s not free software, is it even cost-effective? Personally, I think perhaps not. Since Flash Builder isn’t free, requiring its use for all Flash projects within a company will probably solve one problem and create all new ones.

FlashDevelop

FlashDevelop is my favoured editor and, without getting into the FDT vs FlashDevelop vs Flash Builder debate – I favour it primarily because, whereever I work, I can always get IT to install a copy on my machine, without having to wait for budget approval, bring my laptop instead, etc. However, FlashDevelop is currently for Windows only and is still just one development environment. Even though it’s free and open source, we want to abstract away a project’s configuration and setup from any software that isn’t also cross-platform and industry standard.

Maven

So why not enforce that everyone builds and configures their projects so that they can compile under Maven from a POM? I think it’s a little unrealistic to expect every calibre of ActionScripter to even know what Maven is. At very least, it would create a rather high barrier to entry for prospective developers, making recruitment even more difficult for any company. I agree that it’s a bonus for many, larger projects that may need to pull in dependencies from other projects.

Ant

Ant is a cross-platform solution for software automation, built on Java. Since it’s open source, free, industry standard and pretty easy to set up and use, I’d say its the best choice for configuring the building of projects in a standardised way, without tying anyone to a particular code editor, platform or requiring expensive any software.

Ant can be integrated into most development environments and provides a sensible ‘how the hell am I supposed to build this?’ answer to any project. This also means that, for those people that use it, the Ant script can be used for building with Maven/Hudson, for automatically ensuring all projects will build – even if you only use this to ensure a contractor has left the project in a buildable state.

I also found this helpful article on integrating Ant with FlashDevelop – so if you like that free, open-source feeling, then take a look.

As if our musings pre-empted this universal problem of software engineering, there have since been a rash of other build automation tools invented: Grunt, Gradle, Gulp, Nant, Rake, Buildr, Bazel. Not to mention the gamut of continuous integration software to boot. The key is: discuss the relative benefits of your various tool chain elements and, if maintaining your tools is costing you time instead of saving it, you’re using the wrong tool.

Leave a Reply