Do you REALLY know what SOLID means? (#5: Exclusive Truth about Dependency Inversion Principle)

dependency inversion principle

Dependency Inversion Principle states that entities must depend on abstractions, not on concretions. It asserts that the high-level module must not depend on the low-level module; but they should depend on abstractions. It is one of the fundamental pillars of SOLID principles. But why the term inversion?traditionally, software structures had higher level modules depending on … Read more

Do you REALLY know what SOLID means? (#4: Exclusive Truth about Interface Segregation Principle)

interface segragation principle

Interface Segregation The philosophy of Interface Segregation principle is – larger interfaces should be split into smaller ones. By doing so, we can ensure that implementing classes only need to be concerned about the methods that are of interest to them. The principle states that many client-specific interfaces are better than one general-purpose interface. Clients … Read more

Do you REALLY know what SOLID principles means? Think again! (#3: Exclusive Truth about Liskov Substitution Principle)

Liskov Substitution Principle

Liskov Substitution Formal definition of Liskov substitution principle is –Let φ(x) be a property provable about objects x of type T. Then φ(y) should also be true for objects y of type S where S is a sub-type of T. Or we can say – If class A is a sub-type of class B, then … Read more

Do you REALLY know what SOLID principles means? (#2: Exclusive Truth about Open Closed Principle)

open closed principle

Introduction The Open/Closed Principle (OCP) is a core concept in object-oriented design, stating that software entities—such as classes, modules, and functions—should be “open for extension but closed for modification.” Introduced by Bertrand Meyer in 1988 and later popularized by Robert C. Martin in the early 2000s as part of the SOLID principles, the OCP emphasizes … Read more

Do you REALLY know what SOLID means? (#1: Exclusive Truth about Single Responsibility Principle)

Single Responsibility Principle

Do one thing and do it well!Single Responsibility Principle – This principle states that a class should only have one responsibility. Furthermore, it should only have one reason to change. SRP, like most principles out there, can be over-applied. If we create a new class for incrementing integers, then yeah, that may be a single … Read more