vault backup: 2025-01-17 17:10:15

This commit is contained in:
2025-01-17 17:10:15 +01:00
parent ace642ca60
commit 47d4593b27
4 changed files with 20 additions and 1 deletions

View 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"}

View File

@@ -537,6 +537,7 @@
},
"active": "0276c662bb61f53b",
"lastOpenFiles": [
"Attachments/Pasted image 20250117162946.png",
"Attachments/Pasted image 20250117160123.png",
"Attachments/Pasted image 20250117153316.png",
"Attachments/Pasted image 20250117153232.png",
@@ -549,7 +550,6 @@
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-094333-LIUMLEB.md",
"Attachments/Pasted image 20250117104237.png",
"0 Journal/0 Daily/2025-01-17.sync-conflict-20250117-104331-LIUMLEB.md",
"Attachments/Pasted image 20250117102805.png",
"Temporary/Interviews as an Employer.md",
"5 Media/8 Courses/Design Patterns by Construx.md",
"0 Journal/0 Daily/2025-01-17.md",

View File

@@ -338,9 +338,27 @@ Forces:
> [!Note] Implementation Notes
> - 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
- 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB