1.Encapsulate what varies
2.Favor composition over inheritance
3.Program to interface, not implementation
4.Strive for loosely coupled design between objects that interact
5.Depend on abstractions. Do not depend on concrete classes
6.Only talk to you friends
7.Don't call us, we'll call you
8.A class should have only one reason to change
-摘自Head First Design Patter 一本讲设计模式的好书,Jolt2006大奖的书,很值得读![@more@] OO设计的一些规则 - 摘自Head First Design Pattern
2.Favor composition over inheritance
3.Program to interface, not implementation
4.Strive for loosely coupled design between objects that interact
5.Depend on abstractions. Do not depend on concrete classes
6.Only talk to you friends
7.Don't call us, we'll call you
8.A class should have only one reason to change
-摘自Head First Design Patter 一本讲设计模式的好书,Jolt2006大奖的书,很值得读![@more@] OO设计的一些规则 - 摘自Head First Design Pattern
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/157881/viewspace-918905/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/157881/viewspace-918905/