会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
simple-love
Figure out what you like. Try to become the best in the world of it.
首页
新随笔
订阅
管理
2022年1月24日
观察者模式 vs 发布订阅模式
摘要: 观察者模式(Observer pattern),和发布订阅模式(Publish–subscribe pattern),到底有什么不同? 观察者模式 所谓观察者模式,其实就是为了实现松耦合(loosely coupled)。 用《Head First设计模式》里的气象站为例子,每当气象测量数据有更新,
阅读全文
posted @ 2022-01-24 10:00 simple-love
阅读(113)
评论(0)
推荐(0)
My GitHub