Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head first 设计模式-0x02 #14

Open
ichengzi opened this issue May 17, 2020 · 0 comments
Open

head first 设计模式-0x02 #14

ichengzi opened this issue May 17, 2020 · 0 comments

Comments

@ichengzi
Copy link
Owner

ichengzi commented May 17, 2020

Observer Pattern

观察者模式

有趣的事情发生时, 可千万别错过了, 对象只关注自己感兴趣的事。

分布式环境下的观察者模式, MQ消息中间件,注册感兴趣的消息,并处理。

C# WPF开发中, data bingding PropertyChanged event, 就是WPF binding系统按观察者模式实现的。

Observable Collection 也是通过 IPropertyChanged 接口来实现的。
可以说, WPF MVVM 数据优先, 数据驱动的界面开发模式, 基于事件来解耦 业务代码界面绘制 是观察者模式的应用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant