摘要:定义 原型(Prototype Pattern)是一个简单的设计模式。原型模式的英文原话是:Specify the kind of objects to create using a prototypical instance,and create new objects by copying th
阅读全文
摘要:定义 建造者模式(Builder Pattern)也叫做生成器模式。英文原话是:Separate the construction of a complex object from its representation so that the same construction process ca
阅读全文
摘要:定义 抽象工厂模式(Abstract Factory Pattern)是一种比较常见的模式。英文原话是Provide an interface for creating families of related or dependent objects without specifying their
阅读全文
摘要:定义 单例模式(Singleton Pattern)是最简单的一种设计模式。 英文原话是:Ensure a class has only one instance,and provide a global point of access to it. 意思是:确保一个类只有一个实例,而且自动实例化并
阅读全文
摘要:单一职责原则 单一职责原则(Single Responsibility Principle,简称SRP)的英文原话是:there should nerver be moren than one reason for a class to change.意思是一个类,应当只有一个引起它变化的原因。即一
阅读全文