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 高層模塊不應該依賴低層模塊康吵,兩個都應該依賴抽象。抽象不應該依賴細節(jié)访递,細節(jié)應該依賴抽象晦嵌。針對接口變成,不要對實現(xiàn)編程。...
定義 SRP: 就一個類而言惭载,應該僅有一個引起它變化的原因旱函。一個類承擔的責任過多,就等于把這些職責都耦合在一起描滔,一個職責的變化可能會削弱或者抑制...