随笔分类 - 设计模式
摘要:Motivation 动机 All the time we design a program module and we create some class hierarchies. Then we extend some classes creating some derived classes.
阅读全文
摘要:Motivation 动机 In this context, a responsibility is considered to be one reason to change. This principle states that if we have 2 reasons to change fo
阅读全文
摘要:Motivation 动机 When we design an application we should take care how we are going to make abstract a module which contains several submodules. Consider
阅读全文
摘要:Motivation 动机 When we design software applications we can consider the low level classes the classes which implement basic and primary operations(disk
阅读全文
摘要:Motivation 动机 A clever application design and the code writing part should take care of the frequent changes that are done during the development and
阅读全文
摘要:1. 设计模式定义 模式描述了一个在我们周围不断重复发生的问题,以及该问题的解决方案的核心思想,这样就能直接利用此方案,不必做重复劳动; GOF中的设计模式是对用来在特定场景下解决一般设计问题的类和相互通信的对象的描述; 2. 设计模式分类 GOF中共包含了23种设计模式,根据其目的可以将模式分为创
阅读全文