Enforcing Architecture Boundaries
We have talked a lot about architecture in the previous chapters and it feels good to have a target architecture to guide us in our decisions on how to craft code and where to put it.
In every above-playsize software project, however, architecture tends to erode over time. Boundaries between layers weaken, code becomes harder to test, and we generally need more and more time to implement new features.
In this chapter, we will discuss some measures that we can take to enforce the boundaries within our architecture and thus fight architecture erosion.
Boundaries and Dependencies
Before we talk about different ways of enforcing architecture boundaries, let's discuss where the boundaries lie within our architecture and what "enforcing a boundary" actually means: