Vertical Slice Architecture
As said at the beginning of the previous chapter, instead of separating an application horizontally, a vertical slice groups all horizontal concerns together to encapsulate a feature. Here is a diagram that illustrates that:
Figure 15.1: Diagram representing a vertical slice crossing all layers
Jimmy Bogard, who is a pioneer of this type of architecture and who promotes it frequently, says 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 one vertical slice should not depend on another. With that in mind, when you modify a vertical slice, you don’t have to worry about the impact on...