Skip to content

Latest commit

 

History

History
 
 

chapter02_observer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Chapter 2: Observer design pattern

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.

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.

I find the name contradictory: shouldn't it be called the 'Subject' design pattern as the subject is the key actor ?