Posts Tagged: SOLID

SOLID Made Easy – Interface Segregation Principle

The fourth principle in SOLID is the Interface Segregation Principle (ISP) which is a very simple principle and we must put into practice whenever we can. The Interface Segregation Principle states that clients should not be forced to implement interfaces they don’t use. Instead of one fat interface many small interfaces are preferred based on…

SOLID Made Easy – Liskov Substitution Principle

The third principle in the SOLID principles is the Liskov Substitution Principle (LSP), it was named after Barbara Liskov as together with Jeannette Wing she was able to come up with a definition for subtyping. They defined the principle as: Let (x) be a property provable about objects x of type T. Then (y) should…

SOLID Made Easy – Open-Closed Principle

After learning about the Single Responsibility Principle, we have the Open-Closed Principle which is the second principle in SOLID. A class should be open for extension but closed for modification. The open-closed principle suggests that when a new functionality is to be implemented we should create another class or object rather than modifying existing code…

SOLID Made Easy – Single Responsibility Principle

The SOLID principles are a foundation of good OOP practices. In order to develop high-quality software applications, it is essential for every developer to understand and to practice them. SOLID stands for: S – Single Responsibility Principle O – Open/Closed Principle L – Liskov’s Substitution I –  Interface Segregation D – Dependency Inversion Single Responsibility…