https://github.com/leobastiani/solid
How to apply SOLID principles to your codebase.
https://github.com/leobastiani/solid
programming software-architecture software-design software-development software-engineering solid solid-principles
Last synced: 4 months ago
JSON representation
How to apply SOLID principles to your codebase.
- Host: GitHub
- URL: https://github.com/leobastiani/solid
- Owner: leobastiani
- Created: 2020-09-21T02:27:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-10T01:44:36.000Z (about 5 years ago)
- Last Synced: 2025-09-01T20:07:10.241Z (4 months ago)
- Topics: programming, software-architecture, software-design, software-development, software-engineering, solid, solid-principles
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
Awesome Lists containing this project
README
# How to apply Solid Principles
> Notes:
>
> An _Entity_ is:
>
> - a class which implements methods
> - a function
## S: Single Responsibility Principle (SRP)
- Does the Entity do more of one thing semantically?
- If so: refactor.
## O: Open/Closed Principle (OCP)
- Are there other cases that the Entity can be applied to?
- If so: Is this Entity implemented in a way that applies to all kind of cases and possible future cases?
- If not: refactor.
## L: Liskov Substitution Principle (LSP)
- Will this class be inherited?
- If so: Can the children and parents of that Class be used in such a way that the user needs to know if it is a child or a father?
- If not: refactor.
## I: Interface Segregation Principle (ISP)
- Does this Class have interfaces with methods that do not necessarily need to be implemented?
- If so: refactor.
- Does this Function have parameters that are not needed all the time?
- If so: Is it possible to omit these parameters?
- If not: refactor.
## D: Dependency Inversion Principle (DIP)
- Does this Entity depend on another Entity to exist?
- If so: refactor.