SOLID
In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.
Principles
- Single responsibility
- Open–closed
- Liskov substitution
- Interface segregation
- Dependency inversion
- Snippet from Wikipedia: SOLID
In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible, and maintainable. The principles are a subset of many principles promoted by American software engineer and instructor Robert C. Martin, first introduced in his 2000 paper Design Principles and Design Patterns.
The SOLID concepts are:
- The Single-responsibility principle: 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.
- The Open–closed principle: "software entities ... should be open for extension, but closed for modification."
- The Liskov substitution principle: "objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also design by contract.
- The Interface segregation principle: "many client-specific interfaces are better than one general-purpose interface."
- The Dependency inversion principle: "depend upon abstractions, [not] concretions."
The SOLID acronym was introduced later in 2004 or thereabouts by Michael Feathers.
Although 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.