We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1 Observer Pattern
观察者模式有一个别名叫“订阅—发布模式”。报纸大家都订过吧,当你订阅了一份报纸,每天都会有一份最新的报纸送到你手上,有多少人订阅报纸,报社就会发多少份报纸,这是典型的订阅—发布模式,报社和订报纸的客户就是上面文章开头所说的“一对多”的依赖关系。
2 Pub-Sub Pattern
3 两种模式之间的主要区别可以如下所示:
The text was updated successfully, but these errors were encountered: