vault backup: 2025-01-17 15:08:14
This commit is contained in:
1
.obsidian/plugins/text-extractor/cache/2b3169c79b04f258e20cf9c4f6284743.json
vendored
Normal file
1
.obsidian/plugins/text-extractor/cache/2b3169c79b04f258e20cf9c4f6284743.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"path":"Attachments/Pasted image 20250117141550.png","text":"Bridge: Pattern, Corrected zoperatiend RefinedAbstr1 | | RefinedAbstr2 ConcretelmplementerA | | ConcretelmplementerB E —— e E —— +operationimp() +operationimp()","libVersion":"0.3.2","langs":"deu+eng+fra"}
|
||||||
1
.obsidian/plugins/text-extractor/cache/68ad3f81dbfd4f6e397a57575cc61583.json
vendored
Normal file
1
.obsidian/plugins/text-extractor/cache/68ad3f81dbfd4f6e397a57575cc61583.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"path":"Attachments/Pasted image 20250117142732.png","text":"ACTIVITY: Bridge Pattern MillingMachine E D PartProgram .| ProgramStep +headUp() —— ( —— —— +headDown() L +se +setSpeed() CircleCut RectangleCut -centerX -upperX _+exec 0 -centerY -uppery p e MM1 -lowerY ey | e e ] hoadUp{ *headUp() +headDown() +headDown() +moveTo() +move To() +SetRPM() +setRPM() +setSpeed() +setSpeed()","libVersion":"0.3.2","langs":"deu+eng+fra"}
|
||||||
1
.obsidian/plugins/text-extractor/cache/de2b7e690557cdbbc985063d5f7c739a.json
vendored
Normal file
1
.obsidian/plugins/text-extractor/cache/de2b7e690557cdbbc985063d5f7c739a.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"path":"Attachments/Pasted image 20250117141533.png","text":"Bridge: Pattern, As Published Abstraction Implementor - <> rrrn RefinedAbstraction ConcretelmplementerA | | ConcretelmplementerB +operation() +operationimp() +operationimp()","libVersion":"0.3.2","langs":"deu+eng+fra"}
|
||||||
6
.obsidian/workspace.json
vendored
6
.obsidian/workspace.json
vendored
@@ -537,6 +537,9 @@
|
|||||||
},
|
},
|
||||||
"active": "0276c662bb61f53b",
|
"active": "0276c662bb61f53b",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"Attachments/Pasted image 20250117142732.png",
|
||||||
|
"Attachments/Pasted image 20250117141550.png",
|
||||||
|
"Attachments/Pasted image 20250117141533.png",
|
||||||
"Attachments/Pasted image 20250117115604.png",
|
"Attachments/Pasted image 20250117115604.png",
|
||||||
"Attachments/Pasted image 20250117112716.png",
|
"Attachments/Pasted image 20250117112716.png",
|
||||||
"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",
|
||||||
@@ -554,10 +557,7 @@
|
|||||||
"Templates/Course Template.md",
|
"Templates/Course Template.md",
|
||||||
"Attachments/Pasted image 20250116171230.png",
|
"Attachments/Pasted image 20250116171230.png",
|
||||||
"5 Media/0 Books/More Effective Agile by Steve McConnell.md",
|
"5 Media/0 Books/More Effective Agile by Steve McConnell.md",
|
||||||
"Attachments/Pasted image 20250116163238.png",
|
|
||||||
"Attachments/Pasted image 20250116163115.png",
|
|
||||||
"Temporary/Untitled 1.md",
|
"Temporary/Untitled 1.md",
|
||||||
"Attachments/Pasted image 20250116161534.png",
|
|
||||||
"Temporary/Untitled.md",
|
"Temporary/Untitled.md",
|
||||||
"5 Media/0 Books/Design Patterns by null.md",
|
"5 Media/0 Books/Design Patterns by null.md",
|
||||||
"5 Media/0 Books/null by null.md",
|
"5 Media/0 Books/null by null.md",
|
||||||
|
|||||||
@@ -234,7 +234,28 @@ Build a wrapper around a complex service to simplify the interface.
|
|||||||
- High cohesion / loose coupling (secondary, decouple the service provider)
|
- High cohesion / loose coupling (secondary, decouple the service provider)
|
||||||
### Bridge
|
### Bridge
|
||||||
**Prerequisite**: Adapter Pattern
|
**Prerequisite**: Adapter Pattern
|
||||||
|
Remember the fundamental design pattern of favouring association over inheritance. In a CNC-milling machine example we have 60 different subclasses of a programStep, which all cut different cuts. If I want to add a new communication protocol to communicate with the machine (tcp instead of serial) I would have to add another layer which adds another 60 subclasses, and so forth. This would be really bad and this is where the bridge pattern thrives:
|
||||||
|
|
||||||
|
Goal force: decouple abstraction from implementation so that the two can vary independently. There are variations on two dimensions: the type of cut, the type of communication.
|
||||||
|
Constraint force: layer of indirection: slight performance hit
|
||||||
|
|
||||||
|
**Abstraction and Implementation can vary independently!**
|
||||||
|
|
||||||
|
![[Pasted image 20250117141550.png]]
|
||||||
|
|
||||||
|
Bridge is often inherently an Adapter.
|
||||||
|
|
||||||
|
> [!NOTE] No definition of how "abstractions" get bound to "implementors"
|
||||||
|
> - statically at "abstraction" instantiation
|
||||||
|
> - dynamically as parameter or dependency injection?
|
||||||
|
|
||||||
|
#### Design principles
|
||||||
|
- favor association over inheritance
|
||||||
|
- high coehision/ loose coupling
|
||||||
|
- design to invariants / design for change
|
||||||
|
- liskov substitutability
|
||||||
|
|
||||||
|
![[Pasted image 20250117142732.png]]
|
||||||
### Strategy
|
### Strategy
|
||||||
|
|
||||||
### Composite
|
### Composite
|
||||||
|
|||||||
BIN
Attachments/Pasted image 20250117141533.png
Normal file
BIN
Attachments/Pasted image 20250117141533.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 769 KiB |
BIN
Attachments/Pasted image 20250117141550.png
Normal file
BIN
Attachments/Pasted image 20250117141550.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 796 KiB |
BIN
Attachments/Pasted image 20250117142732.png
Normal file
BIN
Attachments/Pasted image 20250117142732.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
Reference in New Issue
Block a user