|
1 | 1 | :imagesdir: ../images
|
2 |
| -// Open Questions/Discussion: |
3 |
| -// - Is everything considered in the structure or are there things we cannot handle currently? |
4 |
| -// - What about shared technical elements? (AOP for logging across multiple rest adapters) |
5 |
| -// - How to organize multiple modules in a modular monolith and what about shared stuff there? |
6 |
| -// - Should we really name the adapters after the protocol or more speaking (e.g. reservation for a inbound adapter for reservation) |
7 |
| -// - Is structuring core and adapters in packages enough or should we use gradle modules or java modules? |
8 |
| - |
9 |
| -// Todos: |
10 |
| -// - Create ADR (Architecture Design records) |
11 |
| -// - Mention that the structure can be made more lean at any time. Consider three case: |
12 |
| -// - Complex application with great logic (Probably JPA and entities different, also a great core layer) |
13 |
| -// - Application containing logic, but entities and JPA do not differ (potentially a case where the entities in Core can contain JPA specific annotations t avoid mapping) |
14 |
| -// - Pure CRUD application (Leave out core) |
15 |
| -// - Add an ArchUnit example to make call options explicit for devs (and reusable) |
16 | 2 | = Hexagonal Architecture
|
17 | 3 |
|
18 | 4 | Hexagonal architecture, also known as Ports and Adapters, is a software design pattern that promotes separation of concerns by organizing an application into a central core surrounded by external adapters.
|
@@ -75,7 +61,6 @@ image::hexagonal_component_architecture_overview.drawio.svg["devonfw hexagonal a
|
75 | 61 | └── application/
|
76 | 62 | ├── config/
|
77 | 63 | │ └── Configuration.java
|
78 |
| - │ └── Configuration.java |
79 | 64 | ├── core/
|
80 | 65 | │ ├── domain/
|
81 | 66 | │ │ ├── Customer.java
|
@@ -209,7 +194,7 @@ The answer to this problem could be an additional mapping, but this leads to a l
|
209 | 194 | Furthermore, adding the business logic to the domain entities spreads it across use cases, entities and services.
|
210 | 195 | This makes the application more difficult to understand and harder to locate the place for new features or changes.
|
211 | 196 |
|
212 |
| -It's proposed to implement the domain model as anemic entities using Java records. |
| 197 | +It's proposed to implement the domain model as anemic entities. |
213 | 198 | Use use cases and services to implement the business logic and interact with the domain models.
|
214 | 199 |
|
215 | 200 |
|
|
0 commit comments