OO设计原则
2011-03-10 10:14
375 查看
开闭原则(open/close principle, OCP): Open on extensibility , close on modification. We should use interface to encapsulation, use abstract mechanism, and use polymorphism.
Liskov替换原则(Liskov Substitution Principle, LSP),
依赖倒置原则(Dependency Inversion Principle, DIP) depend on interface, instead of concrete class.
接口分离原则(Interface Segregation Principle,ISP): one class given to more clients to use, create each interface for every client, and then this class implement all interfaces.
单一职责原则(Single Responsibility Principle, SRP).
l
l
An excellent system should have these following characteristics:
friendly, understandibility, reliability, reusability, extensibility, portalibity, scalability, simplicity.
Some characteristics conflict, we should make our choice by priority.
But simplicity should be concerned first so that the implementation, use and maintain for the system become simple,
In the end, lower develop cost and shorten develop time.
Attachment: OODesignPrinciples.ppt.zip
Liskov替换原则(Liskov Substitution Principle, LSP),
依赖倒置原则(Dependency Inversion Principle, DIP) depend on interface, instead of concrete class.
接口分离原则(Interface Segregation Principle,ISP): one class given to more clients to use, create each interface for every client, and then this class implement all interfaces.
单一职责原则(Single Responsibility Principle, SRP).
l
l
An excellent system should have these following characteristics:
friendly, understandibility, reliability, reusability, extensibility, portalibity, scalability, simplicity.
Some characteristics conflict, we should make our choice by priority.
But simplicity should be concerned first so that the implementation, use and maintain for the system become simple,
In the end, lower develop cost and shorten develop time.
Attachment: OODesignPrinciples.ppt.zip
相关文章推荐
- [转]OO设计原则总结
- 工厂模式与OO设计原则
- OO设计原则
- OO设计的接口分隔原则
- oo设计原则
- OO设计原则总结
- OO设计模式和设计原则(转)
- OO设计模式和设计原则
- oo之六大设计原则&&Solid原则
- OO设计原则总结
- OO设计的依赖倒置原则
- Interface Segregation Principle (ISP) - OO设计的接口分隔原则
- [转]OO与设计模式的原则、目标
- OO设计的重要原则
- OO 设计原则
- JAVA设计模式之OO设计原则
- OO设计原则 — Single Responsibility Principle:OO设计的SRP单一职责原则
- 【推荐】再说OO设计原则
- 学习笔记: OO五大设计原则
- 工厂模式与OO设计原则