Skip to content

Commit a1dd6a0

Browse files
committed
doc: Update my thoughts on the observer design pattern
1 parent 54b7785 commit a1dd6a0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

chapter02_observer/readme.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Chapter 2: Observer design pattern
22

3-
> **Observer**: defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
3+
> **Observer**: defines a one-to-many dependency between objects so that when one object changes state, all of its
4+
> dependents are notified and updated automatically.
45
5-
Very useful design pattern, often used in user interfaces and as part of the popular Model-View-Controller design pattern used, for instance, in Django.
6-
7-
I find the name contradictory: shouldn't it be called the 'Subject' design pattern as the subject is the key actor ?
6+
A very useful design pattern, often used in user interfaces
7+
and as part of the popular Model-View-Controller (MVC) pattern used,
8+
for instance, in Django.
9+
As I wrote out the code I found it very appealing that I did not need
10+
to change the subject at all to add new observers.

0 commit comments

Comments
 (0)