Introducing layering
Now that we’ve explored a few design patterns and played with ASP.NET Core, it is time to jump into layering. In most computer systems, there are layers. Why? Because it is an efficient way to partition and organize units of logic together. We could conceptually represent layers as horizontal software segments, each encapsulating a concern.
Classic layering model
Let’s start by examining a classic three-layer application design:
Figure 14.1: A classic three-layer application design
The presentation layer represents any user interface that a user can interact with to reach the domain. It could be an ASP.NET Core web application, WPF, WinForms, Android, or any other presentation layer alternative.
The domain layer represents the core logic driven by the business rules; this solves the application’s problem. The domain layer is also called the business logic layer (BLL).
The data layer represents the bridge between...