10 SOLID + GRASP

SOLID and GRASP

SOLID

SOLID (opens in a new tab) is a mnemonic acronym for 5 design principles intended to make object-oriented designs more understandable, flexible, and maintainable. They were introduced by Robert Martin in a paper about software rot (opens in a new tab) in 2000. The SOLID principles are:

  1. S: Single-responsibility principle
  2. O: Open-closed principle
  3. L: Liskov substitution principle
  4. I: Interface segregation principle
  5. D: Dependency inversion principle

GRASP

GRASP (opens in a new tab), short for General Responsibility Assignment Software Patterns, is a set of 9 fundamental patterns in object-oriented design and responsibility assignment, published by Craig Larman in 1997. The different patterns and principles used in GRASP are:

  1. Controller
  2. Creator
  3. Indirection
  4. Information expert
  5. Low coupling
  6. High cohesion
  7. Polymorphism
  8. Protected variations
  9. Pure fabrication

Resources