Application Patterns

Application patterns define how code inside a single process is organised β€” where business rules live, how dependencies flow, and how the application's interior is divided into meaningful zones.

These are the decisions that shape daily development: which layer owns validation, how do services call each other, where does the database interface live, and how is the codebase testable without a running database?

Patterns in This Section

Pattern
Best For
Article

Clear separation of presentation, logic, and data concerns

Rich domain logic, dependency inversion, testability

Decoupling core logic from infrastructure, multiple interfaces

Growing monoliths, team separation, pre-microservice structure

Extensible systems, plugin architectures, tooling

Different read and write models, scaling reads independently

Audit trails, event replay, temporal queries

Note on Modular Monolith

Modular Monolith is covered in detail in Article 02: Modular Monolith Architecture β€” including the story of building it in the POS system. It is listed here for completeness as an application organisation pattern, but there is no duplicate article.

How Application Patterns Relate to System Patterns

System patterns determine deployment boundaries. Application patterns determine code organisation within those boundaries.

You can apply onion architecture inside a microservice, use CQRS inside a monolith, or organise any service with a layered approach. The two categories are orthogonal β€” choose the right one for each concern independently.

Last updated