ITPub博客

首页 > 应用开发 > Java > OO设计的一些规则 - 摘自Head First Design Pattern(原)

OO设计的一些规则 - 摘自Head First Design Pattern(原)

原创 Java 作者:elathen 时间:2007-03-23 21:51:04 0 删除 编辑
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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/157881/viewspace-918905/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-03-06

  • 博文量
    4
  • 访问量
    109794