Skip to content
/ SOLID Public

Principios SOLID, estudiando dichos principios para desarrollo de backend en Python o en cualquier lenguaje

Notifications You must be signed in to change notification settings

SebaCry/SOLID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOLID Principles: A Guide to Clean and Maintainable Code

Overview

This repository is dedicated to understanding and implementing the SOLID principles, which are key guidelines for writing clean, maintainable, and scalable object-oriented code. Each principle addresses specific challenges in software development, aiming to improve flexibility and reduce the risk of code-breaking changes.


What are the SOLID Principles?

The SOLID principles are five design guidelines introduced by Robert C. Martin (Uncle Bob) to ensure robust software design:

  1. S - Single Responsibility Principle (SRP)

    • A class should have one, and only one, reason to change.
    • Goal: Simplify debugging and testing by focusing each class on a single functionality.
  2. O - Open/Closed Principle (OCP)

    • Software entities should be open for extension but closed for modification.
    • Goal: Add new features without altering existing code to reduce the risk of introducing bugs.
  3. L - Liskov Substitution Principle (LSP)

    • Subtypes must be substitutable for their base types.
    • Goal: Ensure that derived classes extend functionality without breaking the behavior of the parent class.
  4. I - Interface Segregation Principle (ISP)

    • A class should not be forced to implement interfaces it doesn’t use.
    • Goal: Avoid bloated interfaces by creating specific ones tailored to client needs.
  5. D - Dependency Inversion Principle (DIP)

    • High-level modules should not depend on low-level modules. Both should depend on abstractions.
    • Goal: Decouple components to make them more reusable and easier to modify.

Repository Structure

.
├── README.md                # Overview of the repository
├── SRP/                     # Examples and explanations for SRP
├── OCP/                     # Examples and explanations for OCP
├── LSP/                     # Examples and explanations for LSP
├── ISP/                     # Examples and explanations for ISP
└── DIP/                     # Examples and explanations for DIP

About

Principios SOLID, estudiando dichos principios para desarrollo de backend en Python o en cualquier lenguaje

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages