摘要:
6大设计原则: 单一职责原则、里氏替换原则、依赖倒置原则、接口隔离原则、迪米特法则、开闭原则 #单一职责原则:Single Responsibility Principle,简称SRP。 There should never be more than one reason for a class t 阅读全文
摘要:
这一篇写剩下五个行为型设计模式: 观察者模式、备忘录模式、访问者模式、状态模式、解释器模式 #观察者模式(Observer Pattern) Define a one-to-many dependency between objects so that when one object changes 阅读全文