Return to book
Review this book
About the author
Introduction
1.
Singleton Pattern
2.
Strategy Pattern
3.
Command Pattern
4.
Observer Pattern
5.
Adapter Pattern
6.
Basic
7.
Factory Pattern
Powered by
GitBook
A
A
Serif
Sans
White
Sepia
Night
Twitter
Google
Facebook
Weibo
Instapaper
Design Patterns
Observer Pattern
說明
定義一種一對多的關係, 使得當一個物件改變時, 所有的觀察者是都被通知到了.
廣為人知的就是發布與訂閱
用在 event-base design
減少在類別中的耦合, 但他們仍然是有些微關連的.