SlideShare a Scribd company logo
Design principles
SRPSingle Responsibility Principle
A class should have one, and only one, reason to change.
OCPOpen-Closed Principle
You should be able to extend a classes behaviour, without modifying it.
LSPLiskov Substitution Principle
Derived classes must be substitutable for their base classes.
DIPDependency Inversion Principle
Depend on abstractions, not on concretions.
ISPInterface Segregation Principle
Make fine grained interfaces that are client specific.
REPRelease-Reuse Equivalency Principle
The granule of reuse is the granule of release.
CCPCommon Closure Principle
Classes that change together are packaged together.
CRPCommon Reuse Principle
Classes that are used together are packaged together.
ADPAcyclic Dependencies Principle
The dependency graph of packages must have no cycles.
SDPStable Dependencies Principle
Depend in the direction of stability.
SAPStable Abstractions Principle
Abstractness increases with stability.
Boy Scout Rule
Leave the code cleaner than you found it.
PoLAPrinciple of Least Astonishment
Related to the concept of developer habitability. If you (and the other fellow
developers of your team) are astonished by some specific solution, please discuss
this with the author (or follow the Boy Scout Rule).
Composition Instead of
Inheritance(Yo-Yo problem)
Inheritance implicates a problem towards testing. Only with sophisticated Build-In-
Tests (and unit tests) inheritance is good to handle.
Information Hiding
Principle Modularize
Around Secrets
Guidance for class design above basic data hiding. Relates also to hiding of
methods and especially algorithms building the value of that class.
SoCSeparation of Concerns
Group related stuff on every level of hierarchy: Method, Class, Package,
Component, Subsystem, ...
YAGNIYou ain't gonna need it
Another "meta-argument" besides the principle of least astonishment, which is
usable to argue against overcomplicated or too abstract/generic programming.
LoDLaw of Demeter
Good metric to follow, if it comes to "chain reactions" while modifying classes.

More Related Content

Similar to Design principles

Sec1_SOLID Principles_Software Engineering.pptx
Sec1_SOLID Principles_Software Engineering.pptxSec1_SOLID Principles_Software Engineering.pptx
Sec1_SOLID Principles_Software Engineering.pptxHebaSamy22
 
Solid as OOP abstraction
Solid as OOP abstractionSolid as OOP abstraction
Solid as OOP abstractionPawel Klimczyk
 
Software Design Principles
Software Design PrinciplesSoftware Design Principles
Software Design PrinciplesOcean Dong
 
Software design principles
Software design principlesSoftware design principles
Software design principlesMd.Mojibul Hoque
 
Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"LogeekNightUkraine
 
Birth of a developer
Birth of a developerBirth of a developer
Birth of a developerPiyush Rahate
 
Design principles in the functional world
Design principles in the functional worldDesign principles in the functional world
Design principles in the functional worldDaniel Leon
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID PrinciplesDave Cook
 
Inversion of Control
Inversion of ControlInversion of Control
Inversion of ControlShuhab Tariq
 
#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui
#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui
#4 | Object Oriented Programming's SOLID Principles | Sameer SiddiquiSameerAhmedSiddiqui1
 
Brief principle and principle of coding
Brief principle and principle of codingBrief principle and principle of coding
Brief principle and principle of codingJingchao Di
 
S.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsS.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsRicardo Wilkins
 
VADER 2011 (Younessi)
VADER 2011 (Younessi)VADER 2011 (Younessi)
VADER 2011 (Younessi)Carlos Cuesta
 

Similar to Design principles (20)

Sec1_SOLID Principles_Software Engineering.pptx
Sec1_SOLID Principles_Software Engineering.pptxSec1_SOLID Principles_Software Engineering.pptx
Sec1_SOLID Principles_Software Engineering.pptx
 
OO Design Principles
OO Design PrinciplesOO Design Principles
OO Design Principles
 
Solid as OOP abstraction
Solid as OOP abstractionSolid as OOP abstraction
Solid as OOP abstraction
 
Software Design Principles
Software Design PrinciplesSoftware Design Principles
Software Design Principles
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Birth of a developer
Birth of a developerBirth of a developer
Birth of a developer
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Design principles in the functional world
Design principles in the functional worldDesign principles in the functional world
Design principles in the functional world
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Oop principles
Oop principlesOop principles
Oop principles
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID Principles
 
Inversion of Control
Inversion of ControlInversion of Control
Inversion of Control
 
SOLID design
SOLID designSOLID design
SOLID design
 
#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui
#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui
#4 | Object Oriented Programming's SOLID Principles | Sameer Siddiqui
 
Spring fundamentals
Spring fundamentalsSpring fundamentals
Spring fundamentals
 
Brief principle and principle of coding
Brief principle and principle of codingBrief principle and principle of coding
Brief principle and principle of coding
 
S.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsS.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software Architects
 
VADER 2011 (Younessi)
VADER 2011 (Younessi)VADER 2011 (Younessi)
VADER 2011 (Younessi)
 

More from Chinh Ngo Nguyen

Software architecture for developers
Software architecture for developersSoftware architecture for developers
Software architecture for developersChinh Ngo Nguyen
 
Case Study of Sound Cloud Architecture
Case Study of Sound Cloud ArchitectureCase Study of Sound Cloud Architecture
Case Study of Sound Cloud ArchitectureChinh Ngo Nguyen
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architectureChinh Ngo Nguyen
 

More from Chinh Ngo Nguyen (6)

Node js internal
Node js internalNode js internal
Node js internal
 
Software architecture for developers
Software architecture for developersSoftware architecture for developers
Software architecture for developers
 
Effective java
Effective javaEffective java
Effective java
 
Inside JVM
Inside JVMInside JVM
Inside JVM
 
Case Study of Sound Cloud Architecture
Case Study of Sound Cloud ArchitectureCase Study of Sound Cloud Architecture
Case Study of Sound Cloud Architecture
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
 

Recently uploaded

Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownloadvrstrong314
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 

Recently uploaded (20)

Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 

Design principles