摘要:
@[Toc] 什么是模板方法模式? 模板方法模式(Template Method Pattern)定义如下: Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template 阅读全文
摘要:
@[Toc] 什么是抽象工厂模式? 抽象工厂模式(Abstract Factory Pattern)是一种比较常用的模式,其定义如下: Provide an interface for creating families of related or dependent objects without 阅读全文
摘要:
@[Toc] 工厂方法模式是使用频率非常高的设计模式,在日常开发经常可以见到。 什么是工厂方法模式? 工厂方法模式的定义: Define an interface for creating an object,but let subclasses decide which class to inst 阅读全文
摘要:
@[Toc] 单例模式是23个模式中比较简单的模式,应用也非常广泛 什么是单例模式? 单例模式的定义: Ensure a class has only one instance, and provide a global point of access to it.(确保某一个类 只有一个实例,而且 阅读全文
摘要:
@[Toc] 什么是开闭原则? 开闭原则的定义: Software entities like classes,modules and functions should be open for extension but closed for modifications.(一个软件实体如类、模块和函 阅读全文