摘要: 学习设计模式 - 建造者模式 一、是什么 将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示。(Spearate the construction of a compolex object from its representation so that the same con 阅读全文
posted @ 2019-08-24 18:26 timfruit 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 策略模式 一、定义 定义一组算法,将每个算法都封装起来,并且使它们之前可以相互转换。(Define a family of algorithms, encapsulate each one, and make them interchangeable.) 二、理解 单独抽取独自变化的行为,定义相应接 阅读全文
posted @ 2019-08-24 15:58 timfruit 阅读(196) 评论(0) 推荐(0) 编辑