docs: add diagrams for dao, data bus, data locality, data mapper, dto

This commit is contained in:
Ilkka Seppälä
2025-04-06 13:08:08 +03:00
parent 0509fabe8e
commit b6c13a2fa0
11 changed files with 24 additions and 0 deletions
+4
View File
@@ -34,6 +34,10 @@ Wikipedia says
> A Data Mapper is a Data Access Layer that performs bidirectional transfer of data between a persistent data store (often a relational database) and an in-memory data representation (the domain layer). The goal of the pattern is to keep the in-memory representation and the persistent data store independent of each other and the data mapper itself. This is useful when one needs to model and enforce strict business processes on the data in the domain layer that do not map neatly to the persistent data store.
Sequence diagram
![Data Mapper sequence diagram](./etc/data-mapper-sequence-diagram.png)
## Programmatic Example of Data Mapper Pattern in Java
The Data Mapper is a design pattern that separates the in-memory objects from the database. Its responsibility is to transfer data between the two and also to isolate them from each other. This pattern promotes the [Single Responsibility Principle](https://java-design-patterns.com/principles/#single-responsibility-principle) and [Separation of Concerns](https://java-design-patterns.com/principles/#separation-of-concerns).
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB