Responsibilities of the common layers
In this section, we explore the most commonly used layers in more depth. We do not dig too deep into each one, but this overview should help you understand the essential ideas behind layering.
Presentation
The presentation layer is probably the easiest layer to understand because it is the only one we can see: the user interface. However, the presentation layer can also be the data contracts in case of a REST, OData, GraphQL, or other types of web service. The presentation layer is what the user uses to access your program. As another example, a CLI program can be a presentation layer. You write commands in a terminal, and the CLI dispatches them to its domain layer, executing the required business logic.
The key to a maintainable presentation layer is to keep it as focused on displaying the user interface as possible with as little business logic as possible.
Next, we look at the domain layer to see where these calls go.