Recently I am doing my side project using Hybrid framework Ionic2.Ionic2...
Definition Separate the construction of a complex object from its repres...
Definition Define an interface for creating an object, but let subclasse...
Definition Defines the steps of an algorithm and allows subclasses to pr...
Definition Provide a surrogate or placeholder for another object to cont...
Definition Defines a family of algorithms, encapsulates each one, and ma...
Definition Attaches additional responsibilities to an object dynamically...
面向接口编程的思想 定义D 高层模块不应该依赖低层模块,两个都应该依赖抽象。抽象不应该依赖细节,细节应该依赖抽象。针对接口变成,不要对实现编程。...
定义 SRP: 就一个类而言,应该仅有一个引起它变化的原因。一个类承担的责任过多,就等于把这些职责都耦合在一起,一个职责的变化可能会削弱或者抑制...