vault backup: 2025-01-17 17:10:15
This commit is contained in:
1
.obsidian/plugins/text-extractor/cache/317689b4568cc0512a441b6f8bdcca77.json
vendored
Normal file
1
.obsidian/plugins/text-extractor/cache/317689b4568cc0512a441b6f8bdcca77.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"path":"Attachments/Pasted image 20250117162946.png","text":"Observer: Often Used with Model-View-Controller A BC D 1 Observers 2 10 3 4 | z |80|10/10 a b c o Ÿ m4 A 2 a = 50% «“ ) —» change notification b = 30% } Subject - -»> requests, changes c= 20%","libVersion":"0.3.2","langs":"deu+eng+fra"}
|
||||||
2
.obsidian/workspace.json
vendored
2
.obsidian/workspace.json
vendored
@@ -537,6 +537,7 @@
|
|||||||
},
|
},
|
||||||
"active": "0276c662bb61f53b",
|
"active": "0276c662bb61f53b",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"Attachments/Pasted image 20250117162946.png",
|
||||||
"Attachments/Pasted image 20250117160123.png",
|
"Attachments/Pasted image 20250117160123.png",
|
||||||
"Attachments/Pasted image 20250117153316.png",
|
"Attachments/Pasted image 20250117153316.png",
|
||||||
"Attachments/Pasted image 20250117153232.png",
|
"Attachments/Pasted image 20250117153232.png",
|
||||||
@@ -549,7 +550,6 @@
|
|||||||
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-094333-LIUMLEB.md",
|
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-094333-LIUMLEB.md",
|
||||||
"Attachments/Pasted image 20250117104237.png",
|
"Attachments/Pasted image 20250117104237.png",
|
||||||
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-104331-LIUMLEB.md",
|
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-104331-LIUMLEB.md",
|
||||||
"Attachments/Pasted image 20250117102805.png",
|
|
||||||
"Temporary/Interviews as an Employer.md",
|
"Temporary/Interviews as an Employer.md",
|
||||||
"5 Media/8 Courses/Design Patterns by Construx.md",
|
"5 Media/8 Courses/Design Patterns by Construx.md",
|
||||||
"0 Journal/0 Daily/2025-01-17.md",
|
"0 Journal/0 Daily/2025-01-17.md",
|
||||||
|
|||||||
@@ -338,9 +338,27 @@ Forces:
|
|||||||
|
|
||||||
> [!Note] Implementation Notes
|
> [!Note] Implementation Notes
|
||||||
> - same notification interface for all observers on same subject (even if information needs are different)
|
> - same notification interface for all observers on same subject (even if information needs are different)
|
||||||
|
> - update() might carry new the updated data, or its just a ping and the observer needs to pull upon the notification
|
||||||
|
> - no control over the order
|
||||||
|
> - subject may need prevent modification of state until all observers were notified
|
||||||
|
> - implementation is an interface and not a base class
|
||||||
|
|
||||||
|
Observer design patterns are often used with model-view-controller architectures
|
||||||
|
![[Pasted image 20250117162946.png]]
|
||||||
|
|
||||||
|
Variation on the theme: Event Channel: many publishers and many subscribers
|
||||||
#### Design Principles
|
#### Design Principles
|
||||||
|
- high cohesion / loose coupling
|
||||||
|
- design to invariants / design for change
|
||||||
|
- encapsulation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
> [!NOTE] Key Points
|
||||||
|
> - pattern allows to notify many others when state changes
|
||||||
|
> - decoupling of information provider from information consumers
|
||||||
|
> - state data can be pushed on update() or pulled by observers
|
||||||
|
> - event channels (variant) supports many publishers and many subscribers on the same channel
|
||||||
|
|
||||||
### Template Method
|
### Template Method
|
||||||
|
|
||||||
|
|||||||
BIN
Attachments/Pasted image 20250117162946.png
Normal file
BIN
Attachments/Pasted image 20250117162946.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Reference in New Issue
Block a user