Skip to content

Commit ba7be25

Browse files
committed
docs: diagrams for table module and template method
1 parent 0b83b6d commit ba7be25

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

table-module/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ In plain words
2828

2929
> The Table Module pattern centralizes and encapsulates database access logic for a specific table, simplifying data retrieval and manipulation while hiding database complexities.
3030
31+
Flowchart
32+
33+
![Table Module flowchart](./etc/table-module-flowchart.png)
34+
3135
## Programmatic Example of Table Module Pattern in Java
3236

3337
In the user system example, the domain logic for user login and registration needs to be managed. By using the Table Module pattern, we can create an instance of the `UserTableModule` class to encapsulate and handle all business logic associated with the rows in the user table.
70.5 KB
Loading

template-method/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Wikipedia says
3434

3535
> In object-oriented programming, the template method is one of the behavioral design patterns identified by Gamma et al. in the book Design Patterns. The template method is a method in a superclass, usually an abstract superclass, and defines the skeleton of an operation in terms of a number of high-level steps. These steps are themselves implemented by additional helper methods in the same class as the template method.
3636
37+
Sequence diagram
38+
39+
![Template Method Pattern Sequence Diagram](./etc/template-method-sequence-diagram.png)
40+
3741
## Programmatic Example of Template Method Pattern in Java
3842

3943
Our programmatic example is about thieves and stealing. The general steps in stealing an item are the same. First, you pick the target, next you confuse him somehow and finally, you steal the item. However, there are many ways to implement these steps.
Loading

0 commit comments

Comments
 (0)