You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/architecture/layered_architecture.adoc
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Batch layer:: Exposes functionality to be used in batch-processes (e.g. mass imp
36
36
37
37
Logic layer:: Contains the business logic.
38
38
39
-
Domain layer:: The domain layer manages the domain entities. This usually includes their persistence.
39
+
Dataaccess layer:: The dataaccess layer manages the entities including their storage and retrieval.
40
40
41
41
==== Front-end service
42
42
@@ -62,9 +62,9 @@ Inside the same component (e.g. _Component A1_) the following rules adhere:
62
62
* Each layer can only depend on resources from the same layer or from the layer below.
63
63
_A1 UseCases_ in the logic layer might depend on the interfaces from the domain layer or have a dependency to another use-case from the same component in the logic layer.
64
64
* A layer can [.underline]#never# depend on a layer above.
65
-
The domain layer should never depend on the logic layer.
65
+
The dataaccess layer should never depend on the logic layer.
66
66
* Layers should not be skipped.
67
-
The service layer should not depend on the domain layer directly.
67
+
The service layer should not depend on the dataacess layer directly.
68
68
69
69
===== Dependencies between components
70
70
@@ -77,8 +77,8 @@ For the next rules it is assumed that _Component A1_ is allowed to call _Compone
77
77
* Only the logic layer can have dependencies on other use cases from other components, because it is a business dependency.
78
78
The logic layer of _Component A1_ depends on the logic layer of _Component A2_.
79
79
* The Service layer of _Component A1_ should [.underline]#not# have a dependency to any other layer in _Component A2_
80
-
* The Logic Layer of _Component A1_ should [.underline]#not# have a dependency to the domain or the service layer in _Component A2_
81
-
* The Domain Layer of _Component A1_ should [.underline]#not# have a dependency to any other layer in _Component A2_
80
+
* The Logic Layer of _Component A1_ should [.underline]#not# have a dependency to the dataaccess or the service layer in _Component A2_
81
+
* The Dataaccess Layer of _Component A1_ should [.underline]#not# have a dependency to any other layer in _Component A2_
82
82
83
83
===== Dependencies to external service
84
84
@@ -94,7 +94,7 @@ Other layer should [.underline]#never# expose their functionality to external se
94
94
95
95
== Constraints and alternatives
96
96
97
-
For services with a very limited number of use cases and exposed endpoints, that are also planned to stay small, the three layers might be an overhead. In such cases it might be an option to combine the logic and service layer. Logic and domain layers should never be combined.
97
+
For services with a very limited number of use cases and exposed endpoints, that are also planned to stay small, the three layers might be an overhead. In such cases it might be an option to combine the logic and service layer. Logic and dataaccess layers should never be combined.
98
98
99
99
For large modulith systems further rules and stricter divisions might be necessary. A possible way to handle this is to keep API and Implementation even stricter separated.
100
100
@@ -157,7 +157,7 @@ The `«artifact»` is typically the technical name of the application.
157
157
158
158
| «layer» |
159
159
The technical layers the code belongs to. The layers are described below.
160
-
| `domain`
160
+
| `dataaccess`
161
161
162
162
| «detail»
163
163
| Depending on the size of the application it might make sense to further divide the layers.
@@ -182,7 +182,7 @@ For versioning of the APIs further sub-packages can be created.
182
182
|`logic`
183
183
|No details expected
184
184
185
-
|`domain`
185
+
|`dataaccess`
186
186
|Use `repository` for repository and `dao` for DAOs.
187
187
Entities belong into `model`.
188
188
@@ -198,7 +198,7 @@ Check if common functionality might fit into other layers.
198
198
----
199
199
«root»
200
200
├──.«component»
201
-
| ├──.domain
201
+
| ├──.dataaccess
202
202
| | ├──.repository
203
203
| | | ├──.«BusinessObject»Repository
204
204
| | | └──.«BusinessObject»Fragment
@@ -219,7 +219,7 @@ Check if common functionality might fit into other layers.
219
219
| └──.model
220
220
| └──.«BusinessObject»Dto
221
221
└──.general
222
-
└──.domain
222
+
└──.dataaccess
223
223
└──.model
224
224
└──.ApplicationPersistenceEntity
225
225
----
@@ -230,7 +230,7 @@ Check if common functionality might fit into other layers.
0 commit comments