
Like a factory is used to automate some of the manufacturing process of given goods, a software development toolchain is a set of software tools, used by programmers, linked together to assist programmers in moving code from the programmer's desktop to a live production environment.
A software development toolchain provides efficiency through automation of repetitive manual tasks, saving people's time and reducing human error.
The toolchain also provides workflow management, prompting activities and maintaining an audit trail and analytics which can be used for forensic examination (eg. tracking down issues) for productivity improvements.
Quality assurance tools and processes are also built into the toolchain, enhancing reliability of the solutions that move through it.
As the concepts of agile and continuous integration become more popular, the toolchain becomes critical, as it provides the necessary efficiencies to make viable frequent deployments of code to Production.
Components of a toolchain
The 4 main components of the tool chain are:
- Version control repository (eg. Git)
- Code review tool (eg. Gerrit)
- Build tool (eg. Ant or Maven)
- Automated deployment tool (eg. Jenkins)
Below, I provide a brief explanation of each.
Version control repositories
A version control repository was originally developed to keep a copy of each version of a piece of code so that programmers can easily return to an earlier version.
But this capability has been greatly built upon to provide various additional benefits. By moving the version control repository to a shared server, they now provide the following benefits:
- Collaboration (shared access to code by several developers)
- Ability to check in and check out code (so that 2 developers are never changing the same bit of code)
- Centralised backup
- Branching (creating a new stream of work that doesn't impact your main piece of code until you are ready for it)
You may have heard of some of the following common version control tools, in order of currency / use:
- Git
- Mercurial
- Subversion or SVN
Code review tools
Code review tools provide a workflow that must be completed before code can be merged (accepted) ready for release to Production. The workflow requires that one or more programmers have reviewed the code and signed it off.
Best practice is for 2 programmers to review the code. Unfortunately the workflow is often set up so that the person who programmed the code can sign off their own code.
Having a peer code review each piece of code that is submitted promotes quality and productivity through, most obviously, peers confirming that the is readable, well structured and correctly satisfies the requirements. Peer code review also allows programmers to learn from each and spreads knowledge of the specific solution - reducing the risk that only one programmer understand a given part of the code.
Code review tools are now often built into version control tools. Still, some names that you may hear include:
- Gerrit
- Phabricator
- GitLab
- Gitbucket
- RhodeCode
- Deveo
Build tools
Build tools are programs that automate the creation of executable applications from source code. Building incorporates compiling, linking and packaging the code into a usable or executable form.
- Downloading dependencies.
- Compiling source code into binary code
- Packaging binary code (into something that can be deployed)
- Running tests
Build tools are language-specific.The following are some common ones:
- Ant, Maven, Gradle (for Java)
- NAnt (for .NET)
- MsBuild (for c#)
Automated deployment tools
Automated deployment is the act of scripting or automating a variety of tasks that software developers do in the deployment of software.
Whilst a focus of automated deployment tools may be the end bit - moving the code from the version control repository to Production environment, automated deployment tools can assist in the movement of code from the start of the toolchain through to the end.
Activities that can be automated include:
- Extraction of code from the version control repository
- Compilation and/or packaging of code
- Execution of database and configuration changes
- Copying of compiled and/or packaged code to server environments
- Reporting / notifying on outcomes of each step
Automated deployment tools that you may hear of include:
- Genkins
- Hudson (effectively a version of Jenkins)
- Bamboo
- Teamcity
- Travis
- GoCD
Setup of the toolchain
Like the setup of a factory which automates manufacturing processes, the setup of a software development toolchain takes some time and investment and requires ongoing development and maintenance.
The maturity of a software development organisation can largely be assessed by the gauging the maturity of their toolchain.
