It does not determine how software is deployed to different operating system processes or physical computers on a network.
Layer
A closely related group of classes, packages, or subsystems with
cohesive responsibilities
.
Higher
layers call services in
lower
layers. Calls do not go the other way.
Common layers in object-oriented systems include the user interface (UI), application logic and domain objects, and technical services.
A layer calls services only in the layer directly below it.
This is common in network protocol stacks.
Relaxed layered architecture
A layer can call services in multiple lower layers.
For example, the UI layer can call both the application logic layer directly below it and elements of the technical services layer, such as logging. This is common in information systems.
Layers separate concerns, high-level and low-level work, and application-specific logic from general services.
They reduce coupling and dependencies.
They improve cohesion.
They make reuse easier.
They make the design clearer.
Related complexity can be encapsulated and decomposed. Some layers can be replaced with a new implementation.
This is generally impractical for low-level technical services or foundation layers such as java.util, but it is possible for the UI, application, and domain layers.
Lower layers contain reusable functionality.
Some layers, especially domain and technical services, can be distributed.
Logical separation makes it easier for teams to develop different parts of the system.
Create software objects with names and information drawn from the
real-world domain
, and give them responsibility for application logic.
A domain object represents something in the problem domain and contains related application or business logic.
Domain layer
The layer that uses domain objects to handle application logic.
Object-oriented developers draw on the real-world domain when creating software classes. This narrows the gap between how stakeholders understand the domain and how the software represents it.
A horizontal division within a relatively flat subsystem or layer.
For example, the technical services layer can be split into partitions such as security and logging.