Skip to content

Commit 7412827

Browse files
committed
Finish ch3 notes
1 parent 69de958 commit 7412827

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

architecture-patterns-python/notes.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,16 @@ Formal definition:
8080
- In return we get a simple abstraction over our storage layer, which we control
8181
- Easy to fake out for unit tests
8282

83-
# Ch3. A brief interlude: on coupling and abstractions
83+
# Ch3. A brief interlude: on coupling and abstractions
84+
- **Coupled components**: when we're unable to change component A for fear of breaking component B
85+
- Locally coupling = good = high *cohesion* between the coupled elements
86+
- Globally coupling = nuisance = increases the risk/cost of changing our code
87+
88+
89+
![abstraction](abstraction.jpeg)
90+
- **Abstraction**: protect us from change by hiding away the complex details of whatever system B does
91+
- We can change the arrows on the right without changing the ones on the left
92+
93+
> Try to write a simple implementation and then refactor toward better design
94+
95+
# Ch4. Our first use case: flask API and service layer

0 commit comments

Comments
 (0)