SlideShare a Scribd company logo
SO LID
S .O. L.I .D.
Single Responsability

       Open-Close


         Liskov susbtitution


       Interface Segregation

  Dependency
  Inversion
“Every class should have a single
resposibility: it should have a single
purpouse in the system, and there should
be only one reason to change it.”
                       Michael C. Feathers




                            http://www.flickr.com/photos/webtreatsetc/4860504249/
Method
Package




          Class




                  http://www.flickr.com/photos/webtreatsetc/4860504249/
Principle
“... code should be open for extension but
closed to modification ...it means ... we
just don’t have to change code much to
add new features.”
                        Michael C. Feathers




                             http://www.flickr.com/photos/webtreatsetc/4860504249/
“Objects of subclasses should be
substitutable for objects of their
superclasses throgout our code. If they
aren’t we could have silent errors in our
code.”
                          Michael C. Feathers




                              http://www.flickr.com/photos/webtreatsetc/4860504249/
“When a class is large, rarely do all of its
clients use all of its methods ... we create
an interface for each of these groupings ...
helps as decrease dependency in the
system.”
                           Michael C. Feathers




                               http://www.flickr.com/photos/webtreatsetc/4860504249/
“Una clase no debe crear instancias de sus
colaboradores, debe tener inyección de
depencias por setters o constructor, esto
facilita los cambios futuros.”

                                 Yo mismo :-)




                             http://www.flickr.com/photos/webtreatsetc/4860504249/
Yeray Darias Camacho
@ydarias

More Related Content

Similar to SOLID principles

960 grid psd
960 grid psd960 grid psd
960 grid psd
Raju Nag
 
WordPress Custom Fields and Metaboxes
WordPress Custom Fields and MetaboxesWordPress Custom Fields and Metaboxes
WordPress Custom Fields and Metaboxes
Tech Liminal
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
Irwansyah Irwansyah
 
Design patterns
Design patternsDesign patterns
Design patterns
mudabbirwarsi
 
Web 2. Tools Every Leader Should Have In Their Backpack
Web 2. Tools Every Leader Should Have In Their BackpackWeb 2. Tools Every Leader Should Have In Their Backpack
Web 2. Tools Every Leader Should Have In Their Backpack
megormi
 
Self-modeling and self-reflection of E-learning communities
Self-modeling and self-reflection of E-learning communitiesSelf-modeling and self-reflection of E-learning communities
Self-modeling and self-reflection of E-learning communities
Zina Petrushyna
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
LogeekNightUkraine
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the project
Jan de Vries
 
Dependency Injection for PHP
Dependency Injection for PHPDependency Injection for PHP
Dependency Injection for PHP
mtoppa
 
Rethinking Best Practices
Rethinking Best PracticesRethinking Best Practices
Rethinking Best Practices
floydophone
 
Asynchronous Messaging @DNUG Cologne, 07.04.2009
Asynchronous Messaging @DNUG Cologne, 07.04.2009Asynchronous Messaging @DNUG Cologne, 07.04.2009
Asynchronous Messaging @DNUG Cologne, 07.04.2009
Sergey Shishkin
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
Gaurav Tyagi
 
SKOS intro
SKOS introSKOS intro
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User Group
Adnan Masood
 
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
강 민우
 
Finding harmony in web development
Finding harmony in web developmentFinding harmony in web development
Finding harmony in web development
Christian Heilmann
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
Lilia Sfaxi
 
Silk Data - Recommendations
Silk Data - RecommendationsSilk Data - Recommendations
Silk Data - Recommendations
Nikolay Karelin
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID Principles
Ganesh Samarthyam
 
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
Carmor Bass
 

Similar to SOLID principles (20)

960 grid psd
960 grid psd960 grid psd
960 grid psd
 
WordPress Custom Fields and Metaboxes
WordPress Custom Fields and MetaboxesWordPress Custom Fields and Metaboxes
WordPress Custom Fields and Metaboxes
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Web 2. Tools Every Leader Should Have In Their Backpack
Web 2. Tools Every Leader Should Have In Their BackpackWeb 2. Tools Every Leader Should Have In Their Backpack
Web 2. Tools Every Leader Should Have In Their Backpack
 
Self-modeling and self-reflection of E-learning communities
Self-modeling and self-reflection of E-learning communitiesSelf-modeling and self-reflection of E-learning communities
Self-modeling and self-reflection of E-learning communities
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the project
 
Dependency Injection for PHP
Dependency Injection for PHPDependency Injection for PHP
Dependency Injection for PHP
 
Rethinking Best Practices
Rethinking Best PracticesRethinking Best Practices
Rethinking Best Practices
 
Asynchronous Messaging @DNUG Cologne, 07.04.2009
Asynchronous Messaging @DNUG Cologne, 07.04.2009Asynchronous Messaging @DNUG Cologne, 07.04.2009
Asynchronous Messaging @DNUG Cologne, 07.04.2009
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
SKOS intro
SKOS introSKOS intro
SKOS intro
 
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User Group
 
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
[IGC 2017] 잔디소프트 윤세민 - HTML5, 크로스플랫폼, 그리고 MMORPG feat. 매드월드
 
Finding harmony in web development
Finding harmony in web developmentFinding harmony in web development
Finding harmony in web development
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Silk Data - Recommendations
Silk Data - RecommendationsSilk Data - Recommendations
Silk Data - Recommendations
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID Principles
 
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...
 

More from Yeray Darias

Runnics at ProductHunt Madrid
Runnics at ProductHunt MadridRunnics at ProductHunt Madrid
Runnics at ProductHunt Madrid
Yeray Darias
 
Otogami at Tetuan Valley
Otogami at Tetuan ValleyOtogami at Tetuan Valley
Otogami at Tetuan Valley
Yeray Darias
 
Runnics en Betabeers Madrid
Runnics en Betabeers MadridRunnics en Betabeers Madrid
Runnics en Betabeers Madrid
Yeray Darias
 
Agile and Scrum
Agile and ScrumAgile and Scrum
Agile and Scrum
Yeray Darias
 
Coffee Script
Coffee ScriptCoffee Script
Coffee Script
Yeray Darias
 
Introducción a la arquitectura software
Introducción a la arquitectura softwareIntroducción a la arquitectura software
Introducción a la arquitectura software
Yeray Darias
 
Scrum
ScrumScrum
Introducción a jQuery
Introducción a jQueryIntroducción a jQuery
Introducción a jQuery
Yeray Darias
 
Integración Continua - TLP+i 2K10
Integración Continua - TLP+i 2K10Integración Continua - TLP+i 2K10
Integración Continua - TLP+i 2K10
Yeray Darias
 

More from Yeray Darias (9)

Runnics at ProductHunt Madrid
Runnics at ProductHunt MadridRunnics at ProductHunt Madrid
Runnics at ProductHunt Madrid
 
Otogami at Tetuan Valley
Otogami at Tetuan ValleyOtogami at Tetuan Valley
Otogami at Tetuan Valley
 
Runnics en Betabeers Madrid
Runnics en Betabeers MadridRunnics en Betabeers Madrid
Runnics en Betabeers Madrid
 
Agile and Scrum
Agile and ScrumAgile and Scrum
Agile and Scrum
 
Coffee Script
Coffee ScriptCoffee Script
Coffee Script
 
Introducción a la arquitectura software
Introducción a la arquitectura softwareIntroducción a la arquitectura software
Introducción a la arquitectura software
 
Scrum
ScrumScrum
Scrum
 
Introducción a jQuery
Introducción a jQueryIntroducción a jQuery
Introducción a jQuery
 
Integración Continua - TLP+i 2K10
Integración Continua - TLP+i 2K10Integración Continua - TLP+i 2K10
Integración Continua - TLP+i 2K10
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 

SOLID principles

  • 2. S .O. L.I .D.
  • 3. Single Responsability Open-Close Liskov susbtitution Interface Segregation Dependency Inversion
  • 4.
  • 5. “Every class should have a single resposibility: it should have a single purpouse in the system, and there should be only one reason to change it.” Michael C. Feathers http://www.flickr.com/photos/webtreatsetc/4860504249/
  • 6. Method Package Class http://www.flickr.com/photos/webtreatsetc/4860504249/
  • 8. “... code should be open for extension but closed to modification ...it means ... we just don’t have to change code much to add new features.” Michael C. Feathers http://www.flickr.com/photos/webtreatsetc/4860504249/
  • 9.
  • 10. “Objects of subclasses should be substitutable for objects of their superclasses throgout our code. If they aren’t we could have silent errors in our code.” Michael C. Feathers http://www.flickr.com/photos/webtreatsetc/4860504249/
  • 11.
  • 12. “When a class is large, rarely do all of its clients use all of its methods ... we create an interface for each of these groupings ... helps as decrease dependency in the system.” Michael C. Feathers http://www.flickr.com/photos/webtreatsetc/4860504249/
  • 13.
  • 14. “Una clase no debe crear instancias de sus colaboradores, debe tener inyección de depencias por setters o constructor, esto facilita los cambios futuros.” Yo mismo :-) http://www.flickr.com/photos/webtreatsetc/4860504249/

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n