# SOLID

{% hint style="success" %}
***SOLID*** is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable. The principles are a subset of many principles promoted by American software engineer and instructor Robert C. Martin.
{% endhint %}

### Single responsibility principle&#x20;

A class should only 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.&#x20;

### Open–closed principle&#x20;

"Software entities ... should be open for extension, but closed for modification."&#x20;

### Liskov substitution principle&#x20;

"Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program."&#x20;

### Interface segregation principle&#x20;

"Many client-specific interfaces are better than one general-purpose interface."&#x20;

### Dependency inversion principle&#x20;

One should "depend upon abstractions, \[not] concretions."
