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: 就一個類而言,應該僅有一個引起它變化的原因。一個類承擔的責任過多,就等于把這些職責都耦合在一起,一個職責的變化可能會削弱或者抑制...