摘要:
观察者模式又叫发布订阅模式,其定义如下: Define a one-to-money dependency between objects so that when one object changes state,all its dependents arenotified and updated 阅读全文
摘要:
迭代器模式定义: Provide a way to access the elements of an aggregate object sequentially without exposingits underlying representation. 它提供了一种方法访问一个容器对象中各个元素 阅读全文
摘要:
【扩展】一个对象如果不存储实体状体以及对象之间的关系,该对象就叫做贫血对象,对应的领域模型就是贫血领域模型有实体状体和对象关系的模型就是充血领域模型 适配器模式的定义: Convert the interface of a class into another interface clients e 阅读全文
摘要:
策略模式的定义: Define a family of algorithms, encapsulates each one, and make them interchangeable. 定义一组算法,将每个算法都封装起来,并且使它们之间可以互换 策略模式三个角色: Context封装角色:上下文角 阅读全文
摘要:
装饰模式的定义: Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternativeto subclassi 阅读全文
摘要:
责任链模式的定义: Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.Chain the receiving obj 阅读全文
摘要:
命令模式的定义: Encapsulated a request as an object ,thereby letting you parameterize clients with different requests, queue or log requests,and support undo 阅读全文
摘要:
中介者模式定义: Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objectsfrom referring to each o 阅读全文
摘要:
原型模式的定义: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype; 用原型实例指定创建对象的种类,并且通过拷贝 阅读全文