Use Class,
Responsibilities, and Collaboration (CRC) Cards to design the system as
a team. The biggest value of CRC cards is to allow people to break away
from the procedural mode of thought and more fully appreciate object
technology. CRC Cards allow entire project teams to contribute to the
design. The more people who can help
design
the system the greater the number of good ideas incorporated.
Individual
CRC Cards are used to represent objects. The class of the object can be
written at the top of the card, responsibilities listed down the left
side, collaborating classes are listed to the right of each
responsibility. We say "can be written" because once a CRC session is
in full swing participants usually only need a few cards with the class
name and virtually no cards written out in full. A short
example is shown as
part of the coffee maker problem.
A
CRC session proceeds with someone simulating the system by talking
about which objects send messages to other objects. By stepping through
the process weaknesses and problems are easily uncovered. Design
alternatives can be explored quickly by simulating the design being
proposed.
If
you find too many people speaking and moving cards at once then simply
limit the number
of people standing and moving cards to two. When one person sits down
another may stand up. This works for sessions that get out of hand,
which often happens as teams become rowdy when a tough problem is
finally solved.
One
of the biggest criticisms of CRC Cards is the lack of written design.
This is usually not needed as CRC Cards make the design seem obvious.
Should a more permanent record be required, one card for each class can
be written out in full and retained as documentation. A design, once
envisioned as if it were already built and running, stays with a person
for some time.
Spike Solution
Portland Pattern Repository Agile Modeling