This repository is dedicated to learning and applying the SOLID principles in software development. The SOLID principles are a set of design principles that promote clean, maintainable, and scalable code architecture. By understanding and implementing these principles, you can improve the quality and flexibility of your software projects.
The SOLID principles are a collection of five design principles introduced by Robert C. Martin, commonly known as Uncle Bob. Each principle focuses on a specific aspect of software design and aims to enhance code readability, maintainability, and extensibility.
A class should have only one reason to change.
Software entities should be open for extension but closed for modification.
Subtypes must be substitutable for their base types.
Clients should not be forced to depend on interfaces they do not use.
High-level modules should not depend on low-level modules. Both should depend on abstractions.
This repository provides practical examples, code snippets to help you understand and apply the SOLID principles in your projects. The repository is organized as follows:
five directories each principe have a directory
- 01.Single Responsibility
- 02.Open Closed
- 03.Liskov Substitution
- 04.Interface Segregation
- 05.Dependency Inversion
each directory have declaration of principles and simple example help you to understand the principle well.
To get started, clone this repository to your local machine. You can then explore the directories and see examples, modify the code, and experiment with different approaches to apply the SOLID principles. Make sure you have a compatible development environment set up to run the examples.
Feel free to contribute to this repository by adding more examples, exercises, or improving the existing content. Pull requests are welcome!
Thanks,
Sallam Rady Ramadan