Chapter 12: Understanding Layering
In this chapter, we'll explore the inherent concepts behind layering. Layering is a popular way of organizing computer systems by encapsulating major concerns into layers. Those concerns are related to a "computer vocation" such as "data access" instead of a "business concern" such as "inventory." It is essential to understand the concepts behind layering as other concepts were born from them.
We'll start this chapter by exploring the initial ideas behind layering. Then, we'll explore alternatives that can help us solve different problems. We will use both an anemic model and a rich model and expose pros and cons of both in action. Finally, we will quickly explore Clean Architecture, which is what I call the evolution of layering.
The following topics will be covered in this chapter:
- Introduction to layering
- Responsibilities of the common layers
- Abstract data layer
- Shared...