This repository contains the real simple examples of how should we use and accept the SOLID principle in our daily coding
SOLID Principles is a coding standard that all developers should have a clear concept for developing software in a proper way to avoid a bad design. SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.It was promoted by Robert C Martin and is used across the object-oriented design spectrum
When the developer builds a software following the bad design, the code can become inflexible and more brittle, small changes in the software can result in bugs. For these reasons, we should follow SOLID Principles. It takes some time to understand, but if you write code following the principles it will improve code quality and will help to understand the most well-designed software.
A class should only have a single responsibility, that is, only changes to one part of the software's specification should be able to affect the specification of the class.
"Software entities ... should be open for extension, but closed for modification."
"Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also design by contract.
"Many client-specific interfaces are better than one general-purpose interface."
One should "depend upon abstractions,concretions."
So in this repository we have five packages of each principle. Each principle has some scenario to understand it and in each principle's packages we have two package Good and Bad.
Please fork this repository and contribute back using pull requests.
Any contributions, large or small, major features, bug fixes, are welcomed and appreciated but will be thoroughly reviewed .