mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-14 00:16:48 +00:00
docs: add diagrams for decorator, delegation, dependency injection, dirty flag, domain model, double buffer, double-checked locking, double dispatch, and dynamic proxy
This commit is contained in:
1 parent
203548ec03
commit
30d13083ae
18 files changed
+36
-12
No files matched your search
@@ -34,6 +34,10 @@ In plain words
|
||||
|
||||
> The Domain Model is an object model of the domain that incorporates both behavior and data.
|
||||
|
||||
Mind map
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Domain Model Pattern in Java
|
||||
|
||||
Let's assume that we need to build an e-commerce web application. While analyzing requirements you will notice that there are few nouns you talk about repeatedly. It’s your Customer, and a Product the customer looks for. These two are your domain-specific classes and each of that classes will include some business logic specific to its domain.
|
||||
@@ -225,10 +229,6 @@ The program output:
|
||||
12:17:23.846 [main] INFO com.iluwatar.domainmodel.Customer -- Tom bought: Eggs - $10.00, Cheese - $20.00
|
||||
```
|
||||
|
||||
## Detailed Explanation of Domain Model Pattern with Real-World Examples
|
||||
|
||||

|
||||
|
||||
## When to Use the Domain Model Pattern in Java
|
||||
|
||||
* Appropriate in complex applications with rich business logic.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
Reference in new issue
Block a user