SlideShare a Scribd company logo
S.O.L.I.D. Principles
Mario P. A. Hennrichs
We are going to talk about
• What is S.O.L.I.D. ?
• S - Single responsibility principle
• O - Open/closed principle
• L - Liskov substitution principle
• I - Interface segregation principle
• D - Dependency inversion principle
• Conclusion
What is S.O.L.I.D. ?
Five design principles intended to make software designs more
understandable, promoted by Robert C. Martin, aka Uncle Bob.
S - Single responsibility principle
A class should only have one reason to change.
O - Open closed principle
Entities should be open for extension but should be closed for
modification.
L - Liskov substitution principle
Let q(x) be a property provable about objects x of type T. Then q(y)
should be provable for objects y of type S where Sis a subtype of T.
I - Interface segregation principle
No client should be forced to implement methods which it does not
use.
D - Dependency invertion principle
Higher level modules should be coupled with the lower level
modules with complete abstraction.
Conclusion
• Think S.O.L.I.D. from the beginning buuuuut no need to
overcomplicate.
• KISS + S.O.L.I.D. it’s a good idea.
Dúvidas
S.O.L.I.D. Principles
Mario P. A. Hennrichs

More Related Content

Similar to Solid talk

CodeCamp Iasi 10 march 2012 - Scratching-SOLID
CodeCamp Iasi 10 march 2012 - Scratching-SOLIDCodeCamp Iasi 10 march 2012 - Scratching-SOLID
CodeCamp Iasi 10 march 2012 - Scratching-SOLID
Codecamp Romania
 
Solid and ioc principles
Solid and ioc principlesSolid and ioc principles
Solid and ioc principles
eleksdev
 

Similar to Solid talk (20)

Common Design Patterns.pptx
Common Design Patterns.pptxCommon Design Patterns.pptx
Common Design Patterns.pptx
 
Liscov substitution principle
Liscov substitution principleLiscov substitution principle
Liscov substitution principle
 
Learning solid principles using c#
Learning solid principles using c#Learning solid principles using c#
Learning solid principles using c#
 
Dependency Inversion
Dependency InversionDependency Inversion
Dependency Inversion
 
How To Write a Testable Code
How To Write a Testable CodeHow To Write a Testable Code
How To Write a Testable Code
 
Is your code solid
Is your code solidIs your code solid
Is your code solid
 
Design principles in the functional world
Design principles in the functional worldDesign principles in the functional world
Design principles in the functional world
 
SOLID Software Principles with C#
SOLID Software Principles with C#SOLID Software Principles with C#
SOLID Software Principles with C#
 
CodeCamp Iasi 10 march 2012 - Scratching-SOLID
CodeCamp Iasi 10 march 2012 - Scratching-SOLIDCodeCamp Iasi 10 march 2012 - Scratching-SOLID
CodeCamp Iasi 10 march 2012 - Scratching-SOLID
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
 
SOLID
SOLIDSOLID
SOLID
 
Software Design Principles (SOLID)
Software Design Principles (SOLID)Software Design Principles (SOLID)
Software Design Principles (SOLID)
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Principle of OOD
Principle of OODPrinciple of OOD
Principle of OOD
 
OO design principles & heuristics
OO design principles & heuristicsOO design principles & heuristics
OO design principles & heuristics
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Solid and ioc principles
Solid and ioc principlesSolid and ioc principles
Solid and ioc principles
 
Is your code SOLID enough?
 Is your code SOLID enough? Is your code SOLID enough?
Is your code SOLID enough?
 
Solid as OOP abstraction
Solid as OOP abstractionSolid as OOP abstraction
Solid as OOP abstraction
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 

Solid talk

  • 2. We are going to talk about • What is S.O.L.I.D. ? • S - Single responsibility principle • O - Open/closed principle • L - Liskov substitution principle • I - Interface segregation principle • D - Dependency inversion principle • Conclusion
  • 3. What is S.O.L.I.D. ? Five design principles intended to make software designs more understandable, promoted by Robert C. Martin, aka Uncle Bob.
  • 4. S - Single responsibility principle A class should only have one reason to change.
  • 5. O - Open closed principle Entities should be open for extension but should be closed for modification.
  • 6. L - Liskov substitution principle Let q(x) be a property provable about objects x of type T. Then q(y) should be provable for objects y of type S where Sis a subtype of T.
  • 7. I - Interface segregation principle No client should be forced to implement methods which it does not use.
  • 8. D - Dependency invertion principle Higher level modules should be coupled with the lower level modules with complete abstraction.
  • 9. Conclusion • Think S.O.L.I.D. from the beginning buuuuut no need to overcomplicate. • KISS + S.O.L.I.D. it’s a good idea.