Skip to main content

CASA Web Framework celebrates 4 years of success

Posted by: , Posted on: - Categories: Our Insights, Our Services

The CASA web framework is now 4 years old. To celebrate its remarkable success, I talked with BPDTS Lead Engineer James Gauld about the past, present, and exciting future of the system.

CASA, short for 'Collect and Submit Application,’ is a framework for building government web applications, designed for:

  • Quick setup
  • Quick turnaround times
  • Ease of configuration

A curious beginning

When James Gauld, Lead Engineer at BPDTS, arrived at the Department for Work and Pensions (DWP) in 2016, he was curious about what he found. "I was fortunate. My manager at the time wanted to make sure that I got an excellent introduction to the business. He took me around the country, and as I travelled, I got to see all the different applications which were being built at the time," says James.

But something seemed strange: A lot of teams were working on similar problems. This was a few years after the classic GOV.UK prototyping kit had been released, launching the familiar pattern of “collect and submit applications”, which took users through a series of pages of information gathering, before sending that information to a department for processing.

James explains: “Lots of different projects were trying to do the same thing in different ways. It was quite a creative time. People were trying all sorts of approaches, and the most effective methods would bubble to the top.”

From brittle to flexible

The most effective method was still to be created. A lot of the systems in use at the time were brittle, written for a specific user journey. Each step of that journey was dependent on the previous steps’ actions. The linear approach meant any alteration to the process, for example, changing the ordering, required a great deal of effort.

James’ team had initially experimented with Java, and Freemarker templating. “But the kit from GOV.UK used JavaScript and Nunjucks. I asked my manager's permission to take a couple of weeks off to build a system that used the same technology as the templating kit, right across the stack,” says James.

Jumpstarting with Nunjucks

James was geared up for the challenge. First off, he was determined that the code should facilitate changes to routing with minimal effort. So, he built a state machine that allowed templates to be quickly slotted into any position in the user’s journey. But it was powerful too: It allowed for complex routing where the answers to particular questions would send the user down a different path.

Those templates were to be built with the Nunjucks pre-processor, which uses a templating language familiar to anyone with experience of Twig, Jinja, or many others. Another win for ease of use. By sharing technology with the GOV.UK templating kit, this also meant that designs from the kit could be moved quickly and easily into CASA.

Finally, James set out to build a simple, modular validation layer for data entered by the user. That was quickly accomplished, and he delivered the finished application to his team at the end of his 2 weeks. The system was a great success and allowed the team to build the project in record time.

Time to replicate the success

James then moved on to another team within the DWP. He wanted to replicate the success of the previous project, so using the same code was an obvious choice.

“We realised that we could build a reusable framework rather than just copy code between applications. During a lull in the post-Christmas work schedule, we set to work refactoring the engine, making a host of changes including the introduction of a directed acyclic graph to model user journeys. In 3 weeks, we turned it into a true framework which could be deployed anywhere. Dan [Boscaro] was a huge help in getting it realised and refactored. We called it CASA, for ‘Collect and Submit Application’. Everything evolved from there,” explains James.

Good news travels fast

From that point onwards, things moved quickly. People in other teams got wind of the new framework and started using it in their projects. Often they would get in touch and discuss specific requirements, resulting in powerful new features being added to CASA as those teams’ customisations were pulled back into the project.

Crowd-sourced documentation

Since then, there have been 5 significant new releases. Each release included a comprehensive migration guide to enable existing users to move up to the latest version easily. The documentation is truly exhaustive and clear. As a testament to the project, I’ve been able to go from a standing start to deploying a working GOV.UK-styled application in 30 minutes.

Teams across the DWP helped by adding to the documentation as they deployed the framework in their projects, making pull requests on the repository on GitHub. James is keen that others get involved: “This really is owned by the community. I’d love more teams to get involved, especially teams from other government departments.”

Low code

So what’s next? Well, the next step may be “low-code”. James has been in touch with teams from elsewhere in the Civil Service, and one thing comes across loud and clear: “Smaller [government] departments don’t have big engineering teams, and they need to be able to deploy quickly.” CASA can offer them a Service in a Sprint1.

The next step may well be to develop a GUI which allows the creation of a full application without touching much code at all. Introducing this kind of differentiating capability would put CASA on a par with commercial low-code platforms, enabling smaller departments to deliver on a shoestring.

Now, 4 years after its inception, the CASA tool has a bright future destined to help government departments overcome the challenges of speed, flexibility and affordability.

You can try out CASA by visiting


1 “Service in a Sprint” is the tagline attached originally to CASA when it was first developed.

Learn more

Stay up to date with what's happening at BPDTS. Sign up for email updates whenever new content gets posted.

Connect with us on LinkedIn, and follow us on Twitter.

Are you thinking of joining us? Please have a look at our current job openings.


Sharing and comments

Share this page

Leave a comment

We only ask for your email address so we know you're a real person

By submitting a comment you understand it may be published on this public website. Please read our privacy notice to see how the GOV.UK blogging platform handles your information.