Layered Architecture
Layered Architecture, AKA n-tiered
- probably the most popular
- It is simple, easy to learn, and fits into Conway’s law
- Conway’s law: companies design architectures mirroring their communication systems.
- The most common tiers are presentation, business, persistence, and database.
- When no one develops the solution architecture, the design converges into n-tiered.
- The layers can be Closed or Open
- Closed Layer: The request comes from the presentation and should go through all the layers
- Open Layer: Allows to skip a layer (sometimes used when the code only has a call to the next layer; sinkhole anti-pattern)
- Shared or Common Code usually belongs to an Open Layer
- It is common to see classes with names like “CustomerBusiness, CustomerDao”
- It belongs to monolithic architectures, with low; elasticity, fault tolerance, modularity, scalability, and testability.