githubEdit

Architecture Best Practices & Patterns

Below are some proven Best Practices for designing an architecture. Treat this as a pick & choose menu of recommendations. Additional best practices recommended by GovStack can be found here: Architecture and Nonfunctional Requirements | cfr-architecturearrow-up-right

Documentation

Data Model

  • Use UTC timestamps

    • Date, Time & Timezones are frequent error sources in software systems. Normalize all your timestamps and store them as UTC timestamps in your persistence layer. Only adapt them to specific timezones when displaying to the user.

  • Use UUIDs for technical primary keys

  • But still keep natural business keys

    • Using UUIDs as recommended above, does not prevent you from also using natural business keys. Some systems allow to use both like Spring/Hibernate's @Id and @NaturalId.

  • Use staging tables for bulk data

    • When handling bulk data (uploads, batches, interfaces with high volumes / large payload), it is best to first store it in its original form without manipulating it (or as close to that as possible). Use dedicated staging tables for that.

    • Having staging tables allows you to

      • analyze the data in its original form, in case of errors

      • distribute the load of processing the data

      • retrigger the processing of the data

Business Components

Last updated

Was this helpful?