Software Design
Design of Services
- We follow most of the guidelines in Java For Small Teams.
- Aim for good test coverage.
- Though it’s standard, we don’t (yet) put a minimum number on code coverage.
- If it’s cumbersome to test something, maybe it’s time for a refactor.
- IntelliJ has great tooling for running tests!
- 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. )
- We use Spring Boot for new Java apps. We’ll follow Spring’s defaults.
12 Factor
- We will follow 12 Factor App.
- 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.
- Configuration should be done with environment variables. These should be listed in the README.
- No configuration should be included in the code. It should be passed in by environment variables.
- No secrets or passwords should be included anywhere in source control.