Vertical Slice Architecture
Instead of separating an application horizontally (layers), a vertical slice encapsulates all horizontal concerns within a single feature scope. Here is a diagram that illustrates that:
Figure 17.1: Diagram representing a vertical slice crossing all layers
Jimmy Bogard, who is a pioneer and proponent of this type of architecture, wrote the following:
”[The goal is to] minimize coupling between slices and maximize coupling within a slice.”
What does that mean? Let’s split that sentence into two distinct points:
- “minimize coupling between slices” (improved maintainability, loose coupling)
- “maximize coupling within a slice” (cohesion)
We could see the former as saying that one vertical slice should not depend on another, so when you modify a vertical slice, you don’t have to worry about the impact on the other slices because the coupling is minimal...