首页 > 其他 > 详细

SOLID Principles

时间:2019-06-06 09:05:34      阅读:86      评论:0      收藏:0      [点我收藏+]

In object oriented programming, SOLID is for five design principles inented to make software designs more understandable, flexible and maintainable.

Single Responsibility Principle:

A class should have a single responsibility, that is, only changes to one part of the software‘s specification should be able to affect the specification of the class

Open-closed principle:

Sotware entities should be open for extension, but closed for modification

Liskov Subsitution principle:

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

Interface segregation principle:

Many client-specific interfaces are better than one general-purpose interface.

Dependency Inversion principle:

One should depend upon abstractions, not concretions.

 

SOLID Principles

原文:https://www.cnblogs.com/victorchen/p/10982847.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!