Skip to content

Commit 81ecb56

Browse files
committed
docs: diagrams for unit of work, update method, and value object
1 parent 6195d5e commit 81ecb56

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

Diff for: unit-of-work/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ In plain words
2929

3030
> Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
3131
32+
Flowchart
33+
34+
![Unit of Work Pattern Flowchart](./etc/unit-of-work-flowchart.png)
35+
3236
## Programmatic Example of Unit of Work Pattern in Java
3337

3438
Arms dealer has a database containing weapon information. Merchants all over the town are constantly updating this information causing a high load on the database server. To make the load more manageable we apply to Unit of Work pattern to send many small updates in batches.

Diff for: unit-of-work/etc/unit-of-work-flowchart.png

99.6 KB
Loading

Diff for: update-method/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ gameprogrammingpatterns.com says
3535

3636
> The game world maintains a collection of objects. Each object implements an update method that simulates one frame of the object’s behavior. Each frame, the game updates every object in the collection.
3737
38+
Sequence diagram
39+
40+
![Update Method Sequence Diagram](./etc/update-method-sequence-diagram.png)
41+
3842
## Programmatic Example of Update Method Pattern in Java
3943

4044
The Update Method design pattern is a behavioral pattern that simulates a collection of independent game or application objects by telling each to process one frame of behavior at a time. This pattern is commonly used in game development, where each object in the game world needs to be updated once per frame.

Diff for: update-method/etc/update-method-sequence-diagram.png

76.8 KB
Loading

Diff for: value-object/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Wikipedia says
4343

4444
> In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity: i.e. two value objects are equal when they have the same value, not necessarily being the same object.
4545
46+
Flowchart
47+
48+
![Value Object Pattern Flowchart](./etc/value-object-flowchart.png)
49+
4650
## Programmatic Example of Value Object Pattern in Java
4751

4852
There is a class for hero statistics in a role-playing game. The statistics contain attributes such as strength, intelligence, and luck. The statistics of different heroes should be equal when all the attributes are equal.

Diff for: value-object/etc/value-object-flowchart.png

64.5 KB
Loading

0 commit comments

Comments
 (0)