SOLID Principles in simple word

SOLID is acronym of these word:
* Single Responsibility Principal
* Open Closed Principal
* Liskov  Substitution Principal
* Interface Segregation Principal
* Dependency Inversion Principal 

Single Responsibility Principal 
> One thing will have only one responsibilities to do thing
> Every object should have single responsibility, and that responsibility should be entirely encapsulated by the class – Wikipedia 
> There should never be more then one reason for a class to change -Robert C. “Uncle Bob” Martine 

Open Close Principal 
> Open for Extension but close for modification
> The Open/Closed Principal states that software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification -Wikipedia 

Liskov  Substitution Principal 
> Subs type should be substitutable for their base type
>  If S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e. an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of the program (correctness, task performed, etc.) – Wikipedia 

The Interface Segregation Principal 
> Interface should have only things (method) which all the client suppose to use otherwise segregate those things (method) which might not be used by client in separate Interface  
> No client should be forced to depend on methods it does not use.[1] ISP splits interfaces that are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them – Wikipedia

Dependency Inversion Principal
> High-level modules should not depend on low-level modules. Both should depend on abstraction.
> Abstraction should not depend on details. Details should depend on abstractions. 

2 thoughts on “SOLID Principles in simple word”

Leave a Reply to AffiliateLabz Cancel reply

Your email address will not be published.