设计模式
gythlover
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
设计模式1——策略模式
设计模式 策略模式Define a family of algorithms,encapsulate each one,and make them interchangeable.定义一系列的算法,把它们封装起来,并且使它们可以相互替换。Strategy lets the algorithm vary independently from clients that use原创 2016-12-28 10:18:57 · 313 阅读 · 0 评论 -
设计模式-依赖倒置原则
参考:http://blog.youkuaiyun.com/zhengzhb/article/details/7289269定义:高层模块不应该依赖底层模块,二者都应该依赖其抽象;抽象不应该依赖细节,细节应该依赖抽象。理解:1、二者都应该依赖其抽象。高层是依赖于接口,底层是通过实现接口来体现依赖。2、依赖倒置中的“倒置”倒置是指:以前开发时往往先考虑底层类的具体实现,而现在应先考虑转载 2017-06-02 12:44:38 · 289 阅读 · 0 评论
分享