Software Design

Software Design

Design of Services

  1. We follow most of the guidelines in Java For Small Teams.
  2. Aim for good test coverage.
    1. Though it’s standard, we don’t (yet) put a minimum number on code coverage.
    2. If it’s cumbersome to test something, maybe it’s time for a refactor.
    3. IntelliJ has great tooling for running tests!
  3. One service is exposed at one hostname / subdomain. (We currently break this convention with the REST API, where paths require routing. We also break it with the apps.crossref.org subdomain. )
  4. We use Spring Boot for new Java apps. We’ll follow Spring’s defaults.

12 Factor

  1. We will follow 12 Factor App.
  2. Greenfield services should build into a container. The container should be pushed into the repo’s repo by CI. This, along with automatic builds, will be automatic if you start with a starter project.
  3. Configuration should be done with environment variables. These should be listed in the README.
  4. No configuration should be included in the code. It should be passed in by environment variables.
  5. No secrets or passwords should be included anywhere in source control.