Understanding layered architecture
If your architecture starts to look like spaghetti and you want to prevent it, having your components structured in layers may help. Remember Model-View-Controller? Or maybe similar patterns, such as Model-View-ViewModel or Entity-Control-Boundary? Those are all typical examples of a layered architecture (also called N-tier architecture if the layers are physically separated from each other). You can structure code in layers, you can create layers of microservices or apply this pattern to other areas where you think it could bring its benefits. Layering provides abstraction and the separation of concerns, which simplifies development, testing, dependency injection, and this is the main reason why it's being introduced. However, it can also help reduce complexity, while improving modularity, reusability, and maintainability of your solution.A layered architecture is often pretty easy to implement since most developers already know the notion of layers...