OO Design之SOLID原则

  • Single Responsibility Principle(单一功能)
    • A class should have only one reason to change.
  • Open Close Principle(开闭原则)
    • Software entities like classes, modules and functions should be open for extension but closed for modifications.
  • Liskov's Substitution Principle(里氏替换)
    • Derived types must be completely substitutable for their base types.
  • Interface Segregation Principle(接口隔离)
    • Clients should not be forced to depend upon interfaces that they don't use.
  • Dependency Inversion Principle(依赖反转)
    • High-level modules should not depend on low-level modules. Both should depend on abstractions.
    • Abstractions should not depend on details. Details should depend on abstractions.

http://www.oodesign.com/design-principles.html

posted @ 2013-01-07 17:20  iThinking  阅读(211)  评论(0编辑  收藏  举报