Responsibility-Driven Design
Design objects by the responsibilities they hold, not the data they store. The mindset — and the CRC cards — that turn a pile of nouns into a collaboration.
Objects as responsible agents
Beginning designers tend to see objects as data records: a Student is a name, an id, and a list of grades. Responsibility-Driven Design (RDD) flips the frame. It asks what each object is responsible for — what it knows, and what it can do — and treats the object as a small agent that collaborates with others to get work done. The data follows from the responsibilities, not the other way around.
This is a subtle but load-bearing shift. Ask "what does a Student know and do?" and you get behavior: knows its enrollments, can compute its GPA, can check prerequisite eligibility. Ask "what fields does a Student have?" and you get an anemic record with all the real logic drifting into service classes. RDD keeps behavior next to the information it needs — the same instinct behind Information Expert.
Two kinds of responsibility
- Knowing responsibilities: what an object knows — its own data, and things it can derive or fetch (a
Courseknows its roster and its schedule). - Doing responsibilities: what an object does — actions it performs, and actions it delegates to collaborators (a
Coursecan enroll a student, which may ask aPrerequisiteto validate eligibility).
A healthy object has a coherent handful of related responsibilities. When the list sprawls across unrelated concerns, cohesion is dropping — see High Cohesion & Low Coupling.
CRC cards: thinking in collaborations
The classic tool for RDD is the CRC card — Class, Responsibilities, Collaborators — one index card per class:
| Section | What goes here |
|---|---|
| Class | The class name (top of the card) |
| Responsibilities | What it knows and does (left column) |
| Collaborators | Other classes it needs to fulfill those responsibilities (right column) |
Two filled cards for a course system:
┌─────────────────────────────────────────────┐
│ Course │
├───────────────────────────┬───────────────────┤
│ Knows its roster │ Enrollment │
│ Knows its schedule │ Student │
│ Enrolls a student │ Prerequisite │
│ Checks capacity │ │
└───────────────────────────┴───────────────────┘
┌─────────────────────────────────────────────┐
│ Enrollment │
├───────────────────────────┬───────────────────┤
│ Knows its student & course│ Student │
│ Knows the grade │ Course │
│ Records a grade │ │
└───────────────────────────┴───────────────────┘The cards are deliberately small — an index card has no room for a god class, which is the point. If the responsibilities overflow the card, that is a signal to split the class.
From cards to a class diagram
Collaborators become relationships: a "Collaborators" entry usually turns into an association or a dependency in the class diagram, depending on whether the link is lasting or transient. Responsibilities become operations and derived attributes. DiaGO's guided projects use exactly this path — identify objects, assign responsibilities, write CRC cards, then build the diagram in Studio.
When RDD earns its keep — and when it doesn't
RDD is most valuable in the early, fuzzy stage of design, on domains rich enough that responsibility placement is genuinely unclear. For a small script or a data-transfer object with no behavior, the ceremony adds little — not every object is a responsible agent, and forcing behavior onto a pure value object is its own anti-pattern. Use the mindset always; reach for the cards when a real design question is on the table.
Common mistakes
- Data-first modeling in disguise. Writing "has name, has id" as responsibilities — those are fields, not knowing responsibilities framed as behavior.
- God cards. A card that needs a second index card is telling you the class does too much.
- Skipping the scenario. CRC cards do little sitting still; their value comes from role-playing a concrete interaction and watching where responsibilities land.
Practice
Pick three classes from a library system — Member, Loan, Book — and write a CRC card for each. Then role-play "a member borrows a book that is currently on loan": walk the responsibilities card to card and note every collaborator you needed. Any collaborator you reached for that is not on a card is a gap in your design.