|
| 1 | += CRC-Cards |
| 2 | +:categories: design-principles |
| 3 | +:roles: software-developer, software-architect, educator, consultant |
| 4 | +:related: grasp, gof-design-patterns, domain-driven-design |
| 5 | +:proponents: Ward Cunningham, Kent Beck |
| 6 | +:tags: crc-cards, oop, object-oriented-design, brainstorming, collaborative-design, class-responsibility-collaboration |
| 7 | +:tier: 3 |
| 8 | + |
| 9 | +[%collapsible] |
| 10 | +==== |
| 11 | +Full Name:: Class-Responsibility-Collaboration Cards |
| 12 | + |
| 13 | +Also known as:: CRC Cards, CRC Card Method, Class-Responsibility-Collaborator Cards |
| 14 | + |
| 15 | +[discrete] |
| 16 | +== *Core Concepts*: |
| 17 | + |
| 18 | +Class:: The name of the class or object being modeled — one index card per class |
| 19 | + |
| 20 | +Responsibilities:: What the class knows (data it holds) and what it does (behavior it provides) — listed on the left side of the card |
| 21 | + |
| 22 | +Collaborators:: Other classes this class depends on to fulfill its responsibilities — listed on the right side of the card |
| 23 | + |
| 24 | +Index cards as design medium:: Deliberately low-tech: physical cards keep design discussions lightweight, encourage discarding and rethinking, and prevent over-engineering |
| 25 | + |
| 26 | +Role-playing scenarios:: Team members physically hold cards and walk through scenarios, simulating message passing between objects to validate design |
| 27 | + |
| 28 | +Collaborative brainstorming:: Encourages cross-functional participation; everyone can contribute without needing deep technical background |
| 29 | + |
| 30 | +Finding classes:: Start with nouns in the problem description; candidate classes are discovered, not prescribed |
| 31 | + |
| 32 | +Iterative refinement:: Cards are cheap to discard — designs are evolved through multiple rounds of role-playing and critique |
| 33 | + |
| 34 | + |
| 35 | +Key Proponents:: Ward Cunningham, Kent Beck ("A Laboratory For Teaching Object-Oriented Thinking", OOPSLA 1989) |
| 36 | + |
| 37 | +[discrete] |
| 38 | +== *When to Use*: |
| 39 | + |
| 40 | +* Early OO design phases — discovering classes, responsibilities, and relationships before writing code |
| 41 | +* Collaborative design sessions where multiple stakeholders or developers shape the domain model |
| 42 | +* Teaching object-oriented thinking by making abstract concepts tangible and interactive |
| 43 | +* Validating design with LLMs by describing cards and role-playing request flows |
| 44 | +* Lightweight architecture exploration before committing to a UML tool or full model |
| 45 | + |
| 46 | +[discrete] |
| 47 | +== *Related Anchors*: |
| 48 | + |
| 49 | +* <<grasp,GRASP>> - Patterns for assigning responsibilities to classes in OO design |
| 50 | +* <<gof-design-patterns,GoF Design Patterns>> - Design patterns that can emerge from CRC-Card sessions |
| 51 | +* <<domain-driven-design,Domain-Driven Design>> - CRC Cards support ubiquitous language and entity discovery |
| 52 | +==== |
0 commit comments