SlideShare a Scribd company logo
SOLID PRINCIPLES
Presented By : Gaurav Mishra
SOLID
SOLID are five basic principles which help to create good software
architecture. SOLID is an acronym where:-
 S stands for SRP (Single responsibility principle)
 O stands for OCP (Open closed principle)
 L stands for LSP (Liskov substitution principle)
 I stands for ISP ( Interface segregation principle)
 D stands for DIP ( Dependency inversion principle)
1 - Single responsibility principle
SRP says that a class should have only one responsibility and
not multiple.
Solid Principles
Solid Principles
2-Open closed principle
 Open/Closed principle says that a class should be open for
extension but closed for modification. Which means that
you can add new features through inheritance but should
not change the existing classes.
Solid Principles
Solid Principles
3-Liskov substitution principle
 " The Liskov Substitution Principle says that the object of a derived
class should be able to replace an object of the base class without
bringing any errors in the system or modifying the behavior of the
base class. "
 it means that we must make sure that new derived classes are
extending the base classes without changing their behavior.
 objects in a program should be replaceable with instances of their subtypes
without altering the correctness of that program.
Solid Principles
Solid Principles
Solid Principles
4-Interface segregation principle
 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 groups of
methods, each one serving one submodule.
 No client should be forced to depend on methods it does not use.
 Many client-specific interfaces are better than one general-purpose interface.
 Show only those method/functionality to the client which they want rather than
showing all the functionality
Solid Principles
Solid Principles
5-Dependency inversion principle
 DIP states that how two modules should depend on each
other.
 A. High-level modules should not depend on low-level modules. Both should depend on
abstractions.
 B. Abstractions should not depend upon details. Details should depend upon
abstractions.
Solid Principles
Solid Principles
Solid Principles
Solid Principles
Solid Principles

More Related Content

PDF
Solid principles
PPTX
VADER 2011 (Younessi)
PPTX
Introduction to SOLID Principles
PPTX
Design principle vs design patterns
PPTX
OO design principle
PPTX
PPTX
S.O.L.I.D. principles of software development
PPTX
Soild principles
Solid principles
VADER 2011 (Younessi)
Introduction to SOLID Principles
Design principle vs design patterns
OO design principle
S.O.L.I.D. principles of software development
Soild principles

Similar to Solid Principles (20)

PPT
DesignPrinciples-and-DesignPatterns
PPTX
OO Design Principles
PPTX
SOLID Software Principles with C#
PDF
Solid principles
PPTX
Software Design Principles (SOLID)
PDF
Understanding SOLID Principles in OOP programming
PPTX
Object Oriented Design SOLID Principles
PPTX
PDF
Software design principles - jinal desai
PPTX
SOLID_Principles_Explained_Presentation.pptx
PPTX
The Solid Principles
PPTX
Solid
PDF
SOLID Design Principles for Test Automaion
PPTX
An ultimate guide to SOLID Principles, developers must know.
PDF
Android architecture
PPTX
Birth of a developer
PPTX
Clean code: SOLID (iOS)
PPTX
Clean code: SOLID
PPT
SOLID principles-Present
PPTX
Dependency Injection, Design Principles and Patterns
DesignPrinciples-and-DesignPatterns
OO Design Principles
SOLID Software Principles with C#
Solid principles
Software Design Principles (SOLID)
Understanding SOLID Principles in OOP programming
Object Oriented Design SOLID Principles
Software design principles - jinal desai
SOLID_Principles_Explained_Presentation.pptx
The Solid Principles
Solid
SOLID Design Principles for Test Automaion
An ultimate guide to SOLID Principles, developers must know.
Android architecture
Birth of a developer
Clean code: SOLID (iOS)
Clean code: SOLID
SOLID principles-Present
Dependency Injection, Design Principles and Patterns
Ad

Recently uploaded (20)

PPTX
Introduction to Artificial Intelligence
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Digital Strategies for Manufacturing Companies
PPTX
ai tools demonstartion for schools and inter college
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Online Work Permit System for Fast Permit Processing
Introduction to Artificial Intelligence
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms I-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Odoo POS Development Services by CandidRoot Solutions
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
CHAPTER 2 - PM Management and IT Context
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PTS Company Brochure 2025 (1).pdf.......
How to Migrate SBCGlobal Email to Yahoo Easily
Digital Strategies for Manufacturing Companies
ai tools demonstartion for schools and inter college
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Navsoft: AI-Powered Business Solutions & Custom Software Development
Online Work Permit System for Fast Permit Processing
Ad

Solid Principles

  • 2. SOLID SOLID are five basic principles which help to create good software architecture. SOLID is an acronym where:-  S stands for SRP (Single responsibility principle)  O stands for OCP (Open closed principle)  L stands for LSP (Liskov substitution principle)  I stands for ISP ( Interface segregation principle)  D stands for DIP ( Dependency inversion principle)
  • 3. 1 - Single responsibility principle SRP says that a class should have only one responsibility and not multiple.
  • 6. 2-Open closed principle  Open/Closed principle says that a class should be open for extension but closed for modification. Which means that you can add new features through inheritance but should not change the existing classes.
  • 9. 3-Liskov substitution principle  " The Liskov Substitution Principle says that the object of a derived class should be able to replace an object of the base class without bringing any errors in the system or modifying the behavior of the base class. "  it means that we must make sure that new derived classes are extending the base classes without changing their behavior.  objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • 13. 4-Interface segregation principle  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 groups of methods, each one serving one submodule.  No client should be forced to depend on methods it does not use.  Many client-specific interfaces are better than one general-purpose interface.  Show only those method/functionality to the client which they want rather than showing all the functionality
  • 16. 5-Dependency inversion principle  DIP states that how two modules should depend on each other.  A. High-level modules should not depend on low-level modules. Both should depend on abstractions.  B. Abstractions should not depend upon details. Details should depend upon abstractions.