You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Identify the aspects of your app that vary and separate them from what stays the same.
3
4
2. Favor composition over inheritance.
4
5
3. Program to an interface, not an implementation.
5
6
4. Loosely coupled designs allow us to build flexible object oriented systems that can handle change because they minimize the inter-dependency between objects.
6
-
5. Classes should be open for extensions, but closed for modifications.
7
+
5. Classes should be open for extensions, but closed for modifications.
8
+
6. Depend upon abstractions. Do not depend upon concrete classes.
Copy file name to clipboardExpand all lines: Design Patterns/Observer Pattern.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
## What it actually means
9
9
10
-
Suppose you have a waitperson at a restaurant holding an important meeting. This server will make the arrangements and synchronize all the entities (including guests and other wait-people). You can tell them to add something (like a drink) to your bill, and the waitperson will track all the information from all the entities across the restaurant. The observer pattern does the same thing. It keeps track of the data needed globally across the program.
10
+
Suppose you have a waitperson at a restaurant holding an important meeting. This server will make the arrangements and synchronize all the entities (including guests and other wait-people). You can tell them to add something (like a drink) to your bill, and the waitperson will track all the information from all the entities across the restaurant. The observer pattern does the same thing. It keeps track of the data needed globally across the program.d
0 commit comments