摘要: 原型模式(Prototype Pattern) 定义:Specify the kinds of objects to create using a prototypical instance,and create new objects by copying this prototype.(用原型实 阅读全文
posted @ 2020-06-12 14:30 meigang 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 代理模式(Proxy Pattern) 定义:Provide a surrogate or placeholder for another object to control access to it.(为其他对象提供一种代理以控制对这个对象的访问。一个类代表另一个类的功能。这种类型的设计模式属于结 阅读全文
posted @ 2020-06-12 09:31 meigang 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 工厂模式 概述: 工厂模式具体包括了简单工厂、工厂方法、抽象工厂,它们是按照从简单到复杂的顺序排列的,属于设计模式中的创建型,其中简单工厂并不属于GOF的23中模式。但是它是理解其它的工厂模式的一个很好的基础,所以很多人在讲述设计模式的时候会提到简单工厂模式。创建型模式关注的是对象的创建,创建型模式 阅读全文
posted @ 2020-06-11 10:28 meigang 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 抽象工厂模式(Abstract Factory Pattern) 定义:Provide an interface for creating families of related or dependent objects without specifying their concrete class 阅读全文
posted @ 2020-06-11 10:26 meigang 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 模板方法模式(Template Method Pattern) 定义:Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template Method lets subclas 阅读全文
posted @ 2020-06-11 10:21 meigang 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 建造者模式(Builder Pattern) 定义:Separate the construction of a complex object from its representation so that the same construction process can create diffe 阅读全文
posted @ 2020-06-11 10:18 meigang 阅读(109) 评论(0) 推荐(0) 编辑