Summary
Layering is one of the most used architectural techniques when it comes to designing applications. An application is often split into three different layers, each managing a single responsibility. The three most popular layers are presentation, domain, and data. You are not limited to three layers, and you can split each one into smaller layers (or smaller pieces inside the same conceptual layer). This allows you to create composable, manageable, and maintainable applications. Moreover, you can create abstraction layers to invert the flow of dependency and separate interfaces from implementations, as we saw with the Abstract Data Layer project. You can persist the domain entities directly or create an independent model for the data layer. You can also use an anemic model (no logic or method) or a rich model (packed with entity-related logic).
From there, out of layering was born Clean Architecture, which provides guidance about how you can organize your application into...