摘要: 工厂模式 概述: 工厂模式具体包括了简单工厂、工厂方法、抽象工厂,它们是按照从简单到复杂的顺序排列的,属于设计模式中的创建型,其中简单工厂并不属于GOF的23中模式。但是它是理解其它的工厂模式的一个很好的基础,所以很多人在讲述设计模式的时候会提到简单工厂模式。创建型模式关注的是对象的创建,创建型模式 阅读全文
posted @ 2020-06-11 10:28 meigang 阅读(84) 评论(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) 编辑