主页

索引

模块索引

搜索页面

Observer-观察者模式

备注

is a publish/subscribe pattern, which allows a number of observer objects to see an event. Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

有各种不同的叫法:

Subject-Observer
Publisher-Subscriber(一对多关系,可同步也可异步)
Producer-Consumer(多对多关系,一般是异步)
EventEmitter-EventListener
Dispatcher-Listener

参考

主页

索引

模块索引

搜索页面