Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/laeth0/solid

This repository provides examples of SOLID principles, illustrating both good and bad practices.
https://github.com/laeth0/solid

Last synced: 9 days ago
JSON representation

This repository provides examples of SOLID principles, illustrating both good and bad practices.

Awesome Lists containing this project

README

        

## SOLID Principles

![Cover](https://github.com/mman9our/SOLID_Principles/assets/72463762/0c6fc35e-4b5a-4249-ad7c-1cabd5b3352a)

SOLID is an acronym that stands for:

- `SRP`: Single Responsibility Principle (SRP): A class should have only one reason to change, meaning it should have only one responsibility or job.
- `OCP`: Open-Closed Principle (OCP): Software entities (classes, modules, functions) should be open for extension but closed for modification. This means that we should be able to extend the behavior of a
- `LSP`: Liskov Substitution Principle (LSP): Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program. In other words, a subclass should be able to replace its parent class without breaking the program's functionality.
- `ISP`: Interface Segregation Principle (ISP): Clients should not be forced to depend on interfaces they do not use. This principle encourages creating smaller, specific interfaces rather than large, monolithic ones.
- `DIP`: Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details; details should depend on abstractions. This principle promotes loose coupling between modules and easier maintenance.