
设计模式
文章平均质量分 77
coderredoc
这个作者很懒,什么都没留下…
展开
-
大话设计模式笔记之---依赖倒置原则
依赖倒置原则(Dependence Inversion Principle,DIP) 又名”面向接口编程” High level moudules should not depend upon low level modules.Both should depend upon abstractions.Absteactions should not depend upon details.De...原创 2018-08-27 16:16:13 · 158 阅读 · 0 评论 -
大话设计模式笔记之---接口隔离原则
接口隔离原则 接口尽量细化,同时接口中的方法尽量少 接口: 分为两种 1.实例接口(Object Interface) Person zhangSan=new Person() 这个实例要遵从的标准就是Person这个类,Person类就是zhnagSan的接口(java中的类也是一种接口) 2.类接口(class Interface) java中使用interfac...原创 2018-08-27 17:33:32 · 340 阅读 · 0 评论