OO设计的一些规则 - 摘自Head First Design Pattern(原)
1.Encapsulate what varies 2.Favor composition over inheritance3.Program to interface, not implementation4.Strive for loosely coupled design between objects that interact5.Depend on abstractions. Do not depend on concrete classes6.Only talk to you friends7.Don't call us, we'll call you8.A class should have only one reason to change-摘自Head First Design Patter 一本讲设计模式的好书,Jolt2006大奖的书,很值得读![@more@]OO设计的一些规则 - 摘自Head First Design Pattern