How does SOLID relate to GRASP principles?

Why Interviewers Ask This

Mid-level SOLID Principles roles require deep understanding of this topic. Interviewers ask this to separate candidates who truly understand the mechanics from those who only know surface-level concepts.

Answer

GRASP (General Responsibility Assignment Software Patterns) is a set of nine principles for assigning responsibilities to classes, formulated by Craig Larman. SOLID and GRASP overlap significantly but approach design from different angles. GRASP's Information Expert (assign responsibility to the class that has the necessary information) parallels SRP. GRASP's Low Coupling and High Cohesion are the underlying goals that SOLID principles achieve through specific rules. GRASP's Polymorphism principle supports OCP. GRASP's Protected Variations principle (identify points of variation and create stable interfaces around them) is essentially OCP stated differently. SOLID is more prescriptive and widely adopted; GRASP is more analytical and often taught in academic software engineering courses.

Common Mistake

Don't just define the term — demonstrate that you understand when to use it and when not to. Showing awareness of trade-offs is what separates average from strong SOLID Principles candidates.