Download presentation
Presentation is loading. Please wait.
1
SOLID Design Principles
2
SOLID Stands For Single responsibility Open-closed Liskov substitution
Interface segregation Dependency inversion The principles, when applied together, intend to make easy to maintain and extend over time system
3
S – SRP - Single responsibility principle
Every class, function, variable should define a single responsibility, and that responsibility should be entirely encapsulated by the context It is important to keep a class focused on a single concern is that it makes the class more robust
4
O –OCP - Open/closed principle
software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification that is, such an entity can allow its behavior to be extended without modifying its source code This is especially valuable in a production environment, where changes to source code may necessitate code reviews, unit tests, and other such procedures to qualify it for use in a product
5
L – LSP - Liskov substitution principle
It is a particular definition of a subtyping relation, called behavioral subtyping If S is a subtype of T, then objects of type T may be replaced with objects of type S without altering any of the desirable properties of that program
6
I – ISP - Interface segregation principle It states that no client should be forced to depend on methods it does not use ISP splits interfaces which 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
7
D – DIP - Dependency inversion principle High-level modules should not depend on low-level modules. Both should depend on abstractions Abstractions should not depend on details. Details should depend on abstractions.
8
THANK YOU!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.