Programming Languages
The Cabinet Office uses a standardised set of programming languages for core software development tasks to enable:
- developers and engineers move between projects easily
- develop shared components that can be reused by different projects
- strength organisational capabilities
- smooth transition between suppliers and in-house capabilities
References
Prototyping
You should use GOV.UK Prototype Kit and follow the guidance in GOV.UK Design Systems to build the protoypes.
Frontend development
Client-side
You should follow the Service Manual Service manual’s guidance, and progressively build your site starting from HMTL, CSS or GOV.UK Frontend.
Whilst you may use JavaScript to add interactive elements to your service, you should follow the advice in service manual and consider the alternative options to JavaScript, and understand how to develop a robust frontend with JavaScript.
Server-side
You should use Node.js for Server side scripting.
You should use Node.js to render a web interface for your service, for example, to created thin, client-facing applications that do not store data.
You may also use TypeScript to work with more complicated requirements, e.g. to working with a statically typed, compiled language,
Backend development
You should use the core languages defined for backend development as follow:
Your can also use Node.js in the backend for serverless systems.
Note on Python
You should write new Python projects in Python 3. Python 2 reached end of life in 2020. Python 3 is now well-supported by application frameworks and libraries, and is commonly used in production.
Using other languages
There may be reasons to deviate from the standardised languages. For example:
- extending an existing codebase or framework
- scripting in a particular operating environment
- experimenting during an alpha (with an expectation that it’s replaced by something we have more confidence in for beta)
- working in a very specific or unusual problem domain, like heavy use of WebSockets
If you want to use a non-standard language, you should seek approval from the Techical Design Authority.