![Cover image for S.O.L.I.D. Principles Around You](https://res.cloudinary.com/practicaldev/image/fetch/s--twyS3ck3--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/0qazxkim2uf50lnwjkhx.png)
In this article, I want to briefly go through [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) principles (the acronym that stands for five basic principles of object-oriented programming and design) supplying each of them with real-world visual examples to make those principles more understandable, readable and memorizable.
> If you want to see code examples instead you may take a look at [variety of tree data structure implementations](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree) in **JavaScript** like [Binary Search Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/binary-search-tree), [AVL Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/avl-tree), [Red-Black Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/red-black-tree), [Segment Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/segment-tree) or [Fenwick Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/fenwick-tree).
So let’s move on!
## [](https://dev.to/trekhleb/s-o-l-i-d-principles-around-you-1o17#s-single-responsibility-principle)S — Single Responsibility Principle
\[a.k.a [SRP](https://en.wikipedia.org/wiki/Single_responsibility_principle)\] A class should have only a single responsibility. Only one potential change in the software’s specification should be able to affect the specification of the class.
\[a.k.a [OCP](https://en.wikipedia.org/wiki/Open/closed_principle)\] Software entities should be open for EXTENSION, but closed for MODIFICATION. Allow behavior to be extended without modifying the source code.
\[a.k.a. [LSP](https://en.wikipedia.org/wiki/Liskov_substitution_principle)\] Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
\[a.k.a. [ISP](https://en.wikipedia.org/wiki/Interface_segregation_principle)\] Many client-specific interfaces are better than one general-purpose interface. No client should be forced to depend on methods it does not use.