Vertical Slice Architecture
As was 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:
Jimmy Bogard, who is the pioneer of this type of architecture and who promotes it frequently, says the following:
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: instead of spreading code around multiple layers, with potentially superfluous abstractions along the way, let's regroup that code together. That helps keep...