This is tutorial that describes SOLID design principles with real-world examples. Also examples of good and bad code are given in specific design principle.
In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles to make software more understandable, flexible and maintanable. The principles are a subset of many principles promoted by American software engineer and instructor Robert C. Martin.
Though they apply to any object-oriented design, the SOLID principles can also form a core philosophy for methodologies such as agile development or adaptive software development. The theory of SOLID principles was introduced by Martin in his 2000 paper Design Principles and Design Patterns, although the SOLID acronym was introduced later by Michael Feathers.
- Ivan Žagar
Thranduil77/SOLID-design-principles/Single_responsibility_principle
A class should have only 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.
Thranduil77/SOLID-design-principles/Open_closed_principle
Software entities ... should be open for extension, but closed for modification.
Thranduil77/SOLID-design-principles/Liskov_substitution_principle
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
Thranduil77/SOLID-design-principles/Interface_segregation_principle
Many client-specific interfaces are better than one general-purpose interface.
Thranduil77/SOLID-design-principles/Dependency_inversion_principle
One should "depend upon abstractions, [not] concretions".