Thinking about this in terms of layers is a bit limited. This is what you see in the product docs, but this is not how the products really work. They have “boxes” that depend on each other in different ways, and you can make them look like they fit into layers, but you can do this in several different configurations, depending on what information you leave on chart.
And in a really well-designed application, the boxes become very small. They reach the level of individual interfaces and classes.
This is important because whenever you change a line of code, you need to have some idea of what impact your change will affect, which means that you must understand exactly what this code is doing at the moment, what are its responsibilities, which means that this should be a small piece that bears one responsibility, implementing an interface that does not make customers depend on what they do not need (S and I SOLID).
You may find that your application may look like it has two or three simple layers if you narrow your eyes, but it may not be so. It's not a problem. Of course, a catastrophically poorly designed application may look like it has level levels if you squint as hard as you can. Thus, these "high-level" diagrams of "architecture" can hide many sins.
source share