Code

Quality

To achieve a high quality of code, we build our code according to the following principles:

  • We follow the DRY (Don't Repeat Yourself) principle whenever possible -- when a piece of code occurs on multiple places, we attempt to re-use it instead of copying it multiple times, if it will not lead to an over-engineered solution.
  • Configurations are stored in the environment (see the section on Cloud), e.g., via environment variables.
  • We assign logical names to our classes, methods, variables, etc., describing the functionality or stored data.
  • All code that is deployed to any of the project environments, is reviewed and approved by at least 1 other developer, according to the four eyes principle.
  • Each project adheres to a defined code style (see the section on Code style).
  • All code should be tested with automated tests. See the testing policy.
  • All code should be well-documented (see the section on Documentation).

Style

A code style definition allows for a fixed code style, and can be used to check whether all code matches the style that is defined. There is no fixed code style that all developers should adhere to. However:

  • Each project should have a code style definition for all programming languages that are used. Each developer working on the code of this project, should adhere to this code style.
  • The code style of a project should be enforced by means of Continuous Integration (see the section on CI/CD) with a code style linter.

To make adhering to a specific code style easier, one can opt to use a .editorconfig (see https://editorconfig.org/), which can be shared among multiple projects. An .editorconfig can be imported into all major IDE's, which allows you to adhere to the style definition while coding.

Programming Languages

The languages that developers can use depend on the purpose. For entire projects, developers are free to use any programming language that meets all of the following conditions:

  • The programming language is one of the following, pre-approved, languages:

    • Java/Kotlin
    • JavaScript/TypeScript
    • C#
    • PHP

      If a language does not appear on this list, consent from the Head of Development is required. Furthermore, if the language used is an interesting language, you are encouraged to give a presentation to the rest of the developers.

      If an agreement has been made with the customer as to which language should be used, this language should always be used.
  • The language version that is used, is stable, up-to-date and supported.

For smaller projects (a few files), or (command line) developer tools, a developer is free to use any language they want, as long as it is stable, up-to-date and supported.

Some frameworks (like Angular) contain options for a so-called strict mode (e.g. stricter nullability checks). It is required that all software projects that are developed with a framework that supports this, and will be deployed to a staging or production environment, have been built with the strict mode enabled. By enabling strict mode, more bugs can be caught ahead of time.

Frameworks

A framework provides a platform for software development. Although strictly speaking not a framework, we do consider (frontend) view libraries as frameworks, as they are heavily integrated into the architecture of the application. Developers are free to use any framework they want, under the following conditions:

  • The framework is one of the following, pre-approved, frameworks:

    • .NET Core Framework
    • Spring Boot Framework
    • Symfony
    • Angular
    • Ionic with Capacitor
    • CraftCMS

      If a framework does not appear on this list, consent from the Head of Development is required. Furthermore, if the framework used is an interesting framework, you are encouraged to give a presentation to the rest of the developers.
  • The framework version that is used, is stable, up-to-date and supported.

Version Support

To keep our applications up to date with the latest modern standards, whilst still supporting a majority of all browsers and devices, we have defined which versions we support by default during development.

Browsers

Browser Last supported version
Google Chrome n - 5
Safari n - 1
Microsoft Edge n - 5
Firefox n - 5

Note: n is the latest stable, major, version of the browser.*

Operating Systems

Browser Last supported version
Windows -1 years
macOS n - 1

Note: n is the latest stable, major, version of the operating system.*

Mobile Operating Systems

Browser Last supported version
Android n - 4
iOS n - 1

Note: n is the latest stable, major, version of the mobile operating system.