说说设计模式~观察者模式(Observer)
观察者模式,也叫发布/订阅模式(publish/subscribe),监视器模式等。在此种模式中,一个目标物件管理所有相依于它的观察者物件,并且在它本身的状态改变时主动发出通知。这通常透过呼叫各观察者所提供的方法来实现。。
何时能用到它?
此种模式通常被用来实现事件处理系统,例如,当一个数据仓储操作中,它的添加功能可能会有一个功能,当添加被触发时,所以订阅了这个添加事件需求的代码 块,都会被触发执行,在这个过程中,数据仓储的添加操作就是被观察者,而所以的订阅者就是它的观察者,发被观察者在某种情况被发起后,所以观察者的代码段 都将被执行。
而对于一个发邮件的功能来说,所有订阅了此功能的模块,只要系统到某个时间点,发邮件的事件就是被触发,此时,所有订阅了此功能的代码模块都会被执行,这种场合,我们见到的不少,如很多网站的新闻订阅,优惠订阅等等,都可以用到它。对于底层开发人员来说,你的CURD操作,如果希望在操作出错后,动态记录日志,事实上,也可以使用这个模式来实现,只要在WEB层或者BLL层订阅一下记录日志的事件即可。
观察者模式的结构图
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAt0AAAF7CAIAAACB+KDLAAAgAElEQVR4nO29bXATV7rv2zXn1r6fMk7duh9P7WQ+nFtnn7NnJlPU3vdU7RxMJuTeqZrMwLxluLvmbDwZ4/AywbiG1GYzDOBkgGADNnFMUEKwk70JDBmME17sGRLbQ2KCg7AnBmyDkeUX+UV+EZJlqa2WtPp+aLndbrVaLamlXt39/9VTlNSWRIPWWv3zep61muEBAAAAAOiAMfoEAAAAAAASwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAALcBLAAAAAEAL8BIAAAAA0AK8BAAAAAC0AC8BAAAAAC3ASwAAAABAC/ASAAAAANACvAQAAAAAtAAvAQAAAAAtwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAALcBLAAAAAEAL8BIAAAAA0AK8BAAAAAC0AC8BAAAAAC3ASwAAAABAC/ASAAAAANACvAQAAAAAtAAvAQAAAAAtwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAAL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qPOS9997u/t2l9FnATQx7HZVHd4PLwEAAKAX1HlJ9+2u99972+izAJq4fOnCubPvw0sAAADoBXVeEuW42pqDSOXQz3zA//vX/u2rr/4KLwEAAKAX1HkJz/Mez2htzcEoxxl9IkANx8naa39uGViJ0ScFAADA3NDoJTzPt7Z8dPnSBaPPAqSk8/OOdxx1MilxuVxGnxcAAABzQ6mXRDnu7JkGx8larBmmjSjHNTedq687cu/uXUyWAAAA0BdKvUSgv+/OoYN7uro6w+GQ0ecCeJ7ne3u7Dx/a++GHHwwkMTQ0ZPTZAQAAMD1UewnP8+Fw6OyZht27ttfXVSOMjZ2/2fzmG9U3v7iRLCWYLAEAAKALtHuJSFfXjba2awgDIzlxI3D//n2jWwcAAACLYBovEXj48KHipREYxcjIiNGNAgAAgHUwmZcIuFwuoy/HAAUlAAAA9MeUXgIAAAAASwIvAQAAAAAtwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAALcBLAAAAAEAL8BIAAAAA0AK8BAAAAAC0AC8BAAAAAC3ASwAAAABAC/ASAAAAANACvAQAAAAAtAAvAQAAAAAtwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAALcBLAAAAAEAL8BIAAAAA0AK8BAAAAAC0AC8BAAAAAC3ASwAAAABAC/ASAAAAANACvAQAAAAAtAAvAQAAAAAtwEsAAAAAQAvwEgAAAADQArwEAAAAALQALwEAAAAALcBLAAAAAEAL8BIAAAAA0AK8BAAAAAC0AC8BAAAAAC3ASwAAAABAC/ASAAAAANACvAQAAAAAtPD/A5Q2bJk3l80EAAAAAElFTkSuQmCC" alt="" />
观察者模式实现说明
SubjectBase:被观察者的基类,它包括了添加观察者,删除观察者,触发观察者的功能
Subject:其中一个被观察者
IObserver:被观察者对象接口,所以被观察者都要实现它,其中SubjectBase也会接收一个IObserver对象,用来触发所有观察者
Observer1:观察者1
Observer2:观察者2
观察者模式的C#实现
#region 观察者模式
/// <summary>
/// 被观察者基类
/// </summary>
public abstract class SubjectBase
{
private ArrayList _observers = new ArrayList();
public void Add(IObserver o)
{
_observers.Add(o);
}
public void Remove(IObserver o)
{
_observers.Remove(o);
}
public void Notify()
{
foreach (IObserver o in _observers)
{
o.Notify();
}
}
}
/// <summary>
/// 被观察者(委托)
/// </summary>
public class Subject : SubjectBase
{ } /// <summary>
/// 观察者实现接口(事件)
/// </summary>
public interface IObserver
{
void Notify();
}
/// <summary>
/// 观察者1
/// </summary>
public class Observer1 : IObserver
{
public void Notify()
{
Console.WriteLine("观察者1");
}
}
/// <summary>
/// 观察者2
/// </summary>
public class Observer2 : IObserver
{
public void Notify()
{
Console.WriteLine("观察者2");
}
}
#endregion
测试代码
Subject subject = new Subject();
subject.Add(new Observer1());
subject.Add(new Observer2());
subject.Notify();
结果如图
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP0AAABaCAIAAAD8Tsf9AAAKoklEQVR4nO2ba1AUyR3A9+txXqKeXk5MjAIiivKSh8hrFRSDIr7wAaeHF73KcZ4P8E588BJEXgo+QA+MXHnn1V1ZuUoqqVSlCqr4lvNxVaEqqXzI12SxKnXIy30ApvPhv7RNz0zvzOzssuz8f/X/MPPfnt7u4bdtT09rCYkora1vVBm5hRdCIj4KiSil8ebK0jdXfgwxL/LjeZEn5kWemLfqxFvu+OStqE9+ArH65E9prDk1HyL61PzoUwuiTy+IPr1g7ekFa08vXHtm4bozC9edeRsipuztmLJFMWWLYssWxZYvii1fHFu+OK58cdzZxXFn34k7+048xKc/S3DHuwmfvbveHUsSP1uSeA4iNOlcaFJFaFJFaHLF0uSKpcnnlyaf/3nKdGy48AsaqReXQWy8uGzjpV9CpF1annZpeVrl8rTK5emVK9IrV6RXrcioWpFRFQaRWR2WWR2eWR2eVR2eVROeVRORVRNhrYmw1q601q7c5I7ITZcjN7tjVXYdjaicuqic+qic+tVbIK6s3nJlzVaIhjW5DdE0tl1dOx3rftXojrzGmLzGmLymmLymmO1NsdubYrc3x+5ojt3RHLejOW5HS1x+S1x+S3x+S/zOlvidrQk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ZwExngDff9+v7rEBQbQRyPvvcVKE+Iq5sv9ed3kEkWGu7L+XXosg+pkr++9l24AgOpkr++/1XYIg8uD+e8SMzIn99yg9YjCBv/8epUeMJ8D336P0iE8I5P33mn5XCKIB3H+PmBHcf4+YEdx/j5gR3H+PmBGj9t8jyFwCvUfMCHqPmBH0HjEj7Hsr7sk1aBZbfNSFgF2YCpBmBDT0vRVdjpSqPysNMwqfdkF6u3zxFVrLz/U/mT+g/8+QZtjTOX0T/TAM+/r+aKo/0P7ZCWjUeC+9m0q3WFxYtnLpsdZ6xPjNe+/7Jc4HQn+DB/XjvSZ3lepUctebesRoNUaTarKFjTrW1HhvLjEjOry3KNxcgTRsRnoge6y+HjE+9YBrtmzSY78EN1ZH433a3+BBn/eyGcEdl/1I/Rep+Qol/Oa9bFJNv9D7WUD9eo5sGZV/Y/GfXM2XiusR4E/vuWar7Jea/qrvhU/7Gzx4XL8XfCS9xYK/t9LfQzavox6lmrVepR5p/bJ3T+kS2ZKCW6qjPTo6ZRbwfS1iRtB7xIyg94gZQe8RM4LeI2YEvUfMCHqPmBHcf+9NtYG2ZB44LQl0cP+9gZX74ovU1yl+/4XMAPffe/8VPqpca/1B84fzB7j/3hu4Lsgm1fdLnNfUC5/2OhjA/fdcSU2qyRY26lhT46Wt0nqVucD9997ANVs26bFfghuro/E+7W/wgPvvvcGQfhnoPUqvFtx/7w3S5rF5lf1S0181vRDUg/Dg/nvdSOuXvXtKl8iWFNxSHe3R0SmzgO9rETOC3iNmBL1HzAh6j5gR9B4xI+g9YkbQe8SMoPeIGUHvETOC3iMm5P9oDXXkCM4tkwAAAABJRU5ErkJggg==" alt="" />
说说设计模式~观察者模式(Observer)的更多相关文章
- java设计模式--观察者模式(Observer)
java设计模式--观察者模式(Observer) java设计模式--观察者模式(Observer) 观察者模式的定义: 定义对象间的一种一对多的依赖关系.当一个对象的状态发生改变时,所有依赖于它的 ...
- 设计模式-观察者模式(Observer Pattern)
观察者模式(Observer Pattern):定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象.这个主题对象在状态发生变化时,会通知所有观察者对象,使他们能够自动更新自己. 观察者 ...
- 设计模式 - 观察者模式(Observer Pattern) 详细说明
观察者模式(Observer Pattern) 详细说明 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26583157 版权全部 ...
- 设计模式 - 观察者模式(Observer Pattern) 详细解释
观察者模式(Observer Pattern) 详细解释 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26583157 版权全部 ...
- 设计模式 - 观察者模式(Observer Pattern) Java内置 用法
观察者模式(Observer Pattern) Java内置 用法 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26601659 ...
- 设计模式--观察者模式Observer(对象行为型)
一.观察者模式 观察者模式是在对象之间定义一对多的依赖,这样一来,当一个对象改变状态,依赖它的对象都会收到通知,并自动更新.观察者模式也被称之为:主题-观察者模式,发布-订阅模式,前者是一,后者是多. ...
- 大话设计模式--观察者模式 Observer -- C++ 实现实例
大话设计模式--1.观察者模式: 定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象,这个主题对象在状态发生变化时,会通知所有的 观察者对象,使他们能够自动更新自己. 使用场合: 当一 ...
- [工作中的设计模式]观察者模式observer
一.模式解析 观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象.这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己. 观察者模式又叫订阅发布模式, ...
- C#设计模式——观察者模式(Observer Pattern)1
一.概述在软件设计工作中会存在对象之间的依赖关系,当某一对象发生变化时,所有依赖它的对象都需要得到通知.如果设计的不好,很容易造成对象之间的耦合度太高,难以应对变化.使用观察者模式可以降低对象之间的依 ...
- C#设计模式——观察者模式(Observer Pattern)
一.概述在软件设计工作中会存在对象之间的依赖关系,当某一对象发生变化时,所有依赖它的对象都需要得到通知.如果设计的不好,很容易造成对象之间的耦合度太高,难以应对变化.使用观察者模式可以降低对象之间的依 ...
随机推荐
- tomcat详情
[转载]http://grass51.blog.51cto.com/4356355/1123400
- Missing separate debuginfos
问题:Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64解决:1.将/etc/yum.rep ...
- Sublime Text 用法小记
复制当前行: Ctrl + Shift + D 上下移动行: Ctrl + Shift + ↑/↓ 选中行部分: Crtl + Shift + ←/→ 格式化json: Ctrl + Alt + J
- jquery 常用方法
1:判断checkbox是否选中 <input type="checkbox" id="cbx" /><label for="cbx ...
- 分析sql语句所有表名及其别名的正则表达式
最近为了 写一个分布式的数据组件构想了很多的方案,最近一个简单易行的方案终于在脑袋里成型.昨晚想到凌晨1点多,发现方案虽简单,但所有的数据库工具就不能使用了 .除非自己写一下查询分析器来执行程序员自己 ...
- tail queue代码阅读
tail queue是bdb中用的最多的数据结构. 定义在 src/dbinc/queue.h: 注: TRACEBUF,QMD_TRACE_HEAD等是为了 queue代码的debug, 这里移除出 ...
- iOS进阶_地图定位
一.定位步骤 1.Xcode自带地图,直接先引入头文件 #import <CoreLocation/CoreLocation.h> 2.CLLocation框架中的CLLocationMa ...
- 我的iOS之路2
第一篇果然没人看呢...好吧...那就当笔记做吧...第一篇主要写的是生成了一个helloworld,可能也是和别人撞了,所以有点厌烦,连名字都改掉吧 好,开始写第二篇 之前做第一个应用程序的时候没有 ...
- css各项水平居中
当被设置元素为块状元素时用text-align:center就不起作用了,这也分两种情况,定宽块状元素和不定宽块状元素. 一.定宽块状元素:快状元素的宽度width为固定值,之后我们可以将左右marg ...
- SQL Server 2008 R2 下移动数据库的存储位置
使用场景:1. 该数据库增长的较大,存储磁盘空间不足: 2. 在特定情况下该数据库需要移动到另外一块磁盘上(呵呵...我的情况就是之前的磁盘要还给别人) 步骤: 1. 新建查询 SELECT na ...