Understanding SOLID principles
Since the advent of programming, developers have discussed ideas and captured principles to help develop better software. These principles arose as a response to help handle highly complex code. After suffering multiple times from the same recurrent problems, developers started recognizing those problems’ patterns and devised techniques to prevent such issues. A notable example is the Gang of Four (GoF) book on design patterns, which caused a tremendous impact in the object-oriented world and continues to influence generations of developers to this day. Another remarkable and influential example is the ideas formulated by Robert Martin that led to SOLID principles.
SOLID stands for the following principles:
- Single Responsibility Principle (SRP)
- Open Closed Principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
These principles aim to help developers...