OO Design之SOLID原则
生活随笔
收集整理的這篇文章主要介紹了
OO Design之SOLID原则
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
- Single Responsibility Principle(單一功能)
- A class should have only one reason to change.
- Open Close Principle(開(kāi)閉原則)
- 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(依賴(lài)反轉(zhuǎn))
- 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
轉(zhuǎn)載于:https://www.cnblogs.com/dahai/archive/2013/01/07/2849739.html
總結(jié)
以上是生活随笔為你收集整理的OO Design之SOLID原则的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 苹果手机用u盘不能连接电脑没反应怎么办
- 下一篇: 电脑u盘端口禁用了怎么办 电脑U盘端口失