Skip to content

Best Practices

We should always strive to follow best practices when developing software. This will ensure that our code is maintainable, scalable, and secure.

Twelve Factor Methodology

The twelve-factor methodology is a great starting point for best practices.

  • Codebase: One codebase tracked in revision control, many deploys.
  • Dependencies: Explicitly declare and isolate dependencies.
  • Config: Store config in the environment.
  • Backing Services: Treat backing services as attached resources.
  • Build, Release, Run: Strictly separate build and run stages.
  • Processes: Execute the app as one or more stateless processes.
  • Port Binding: Export services via port binding.
  • Concurrency: Scale out via the process model.
  • Disposability: Maximize robustness with fast startup and graceful shutdown.
  • Dev/Prod Parity: Keep development, staging, and production as similar as possible.
  • Logs: Treat logs as event streams.
  • Admin Processes: Run admin/management tasks as one-off processes.

For detailed steps and more information, visit the Twelve-Factor App website.