Layered architecture organizes software into layers with defined responsibilities and constrained dependencies. Strict layering allows each layer to depend only on the one immediately below; relaxed layering permits dependencies on any lower layer. section 3.3.1
A common three-tier structure assigns responsibilities as follows:
- Presentation: user interface or external API. section 3.3.1
- Business logic: application rules. section 3.3.1
- Persistence: database interaction. section 3.3.1
This structure has trade-offs. A single presentation or persistence layer may not reflect applications with multiple callers or databases. Depicting business logic as dependent on persistence can also make database-free testing difficult. In a well-designed dependency arrangement, business logic defines data-access interfaces and persistence implements them, reversing the dependency shown by the layers. In a monolith, technical layers can also scatter each subdomain’s code across the application. section 3.3.1 section 6.2.1
FTGO monolith
The consumers, orders, and notifications subdomains are each spread across web, domain, and persistence layers. Consumer and order controllers sit in web; their business classes sit in domain; and repositories sit in persistence. section 6.2.1
Figure 6.7 In a technology-oriented layered architecture, the code for each subdomain is scattered across the technical layers. As a result, there’s a mismatch between the application architecture and the subdomains and the teams that develop them.
Shows how technical layers scatter subdomain code, creating a mismatch between architecture and the subdomains and teams that develop it. section 6.2.1


