Explore Topics
GRASP — General Responsibility Assignment Software Patterns — is Craig Larman's answer to the question SOLID leaves on the table: once you have decided to use small focused classes, WHICH class gets which responsibility? Larman lays out nine principles, each a tested answer to a recurring assignment question. Five are foundational (Information Expert, Creator, Controller, Low Coupling, High Cohesion); four handle "what if the obvious answer is not good enough?" (Polymorphism, Pure Fabrication, Indirection, Protected Variations). The running domain throughout this topic is Larman's canonical Point-of-Sale system: Sale, SalesLineItem, Product, Register, Payment, NewSaleController — chosen because every GRASP principle has a clean question to answer about it.
- Larman, "Applying UML and Patterns" — 1st ed. 1997, current 3rd ed. 2004
- GRASP = General Responsibility Assignment Software Patterns
- 5 core principles: Information Expert, Creator, Controller, Low Coupling, High Cohesion
- 4 advanced principles: Polymorphism, Pure Fabrication, Indirection, Protected Variations
- SOLID and GRASP COMPLEMENT each other — SOLID is "how to shape", GRASP is "who gets what"
- GRASP is the conceptual bridge from UML responsibility assignment to GoF design patterns
- ✦Gives a name and a defense to every responsibility assignment decision
- ✦Ties directly to UML sequence diagrams — the place where assignment happens visually
- ✦Aligns with most GoF patterns (Controller, Factory, Adapter, Strategy are GRASP applied)
- ✦Vocabulary makes design code review concrete instead of subjective
- △Less famous than SOLID — fewer one-line slogans, harder to remember off the cuff
- △Some principles (Polymorphism, Pure Fabrication) overlap with GoF patterns and SOLID
- △"Protected Variations" is hard to apply prematurely — it asks "what will change?" honestly
- △Larman's textbook is dense; the principles are easier to teach than to internalize