外观模式
Facade Pattern: Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. 外观模式:为子系统中的一组接口提供一个统一的入口。外观模式定义了一个高层接口, 这个接口使得这一子系统更加容易使用。 ...

Facade Pattern: Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. 外观模式:为子系统中的一组接口提供一个统一的入口。外观模式定义了一个高层接口, 这个接口使得这一子系统更加容易使用。 ...

Decorator Pattern: Attach additional resposibilies to an object dynamically. Decorators provide a flexible alternative to subclassing for exlending functionality. 装饰模式:动态地给一个对象增加一些额外的职责。就扩展功能而言,装饰模式提供了一种比使用子类更加灵活的替代方案。 ...

Composite Pattern: Compose object into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. 组合模式:组合多个对象形成树形结构以表示具有部分-整体关系的层次结构。组合模式让客户端可以统一对待单个对象和组合对象。 ...

Bridge Pattern: Decouple an abstraction from its implementation so that the two can vary independently. 桥接模式:将抽象部分与它的实现部分解耦,使得两者都能够独立变化。 桥接模式是一种结构型设计模式,它将抽象与实现解耦,使得两者可以独立地变化。这种模式涉及到一个抽象类,它将实现类的对象作为一个成员变量,并通过构造函数或者 setter 方法将实现类的对象传递给抽象类。这样,抽象类可以在运行时调用实现类的方法,而不需要知道具体的实现细节。 ...

Singleton Pattern: Ensure a class has only one instance, and provide a global point of access to it. 单例模式:确保一个类只有一个实例,并提供一个全局访问点来访问这个唯一实例。 优缺点和使用场景 单例模式的优点主要如下: (1)单例模式提供了对唯一实例的受控访问。 因为单例类封装了它的唯一实例,所以它可以严格控制客户怎样以及何时访问它。 ...
