I was always wondering why I still can find developers not familiar with this tool.
- The class name is the name of the component being described. In the example, we are introducing a Shopping Cart.
- The responsibility section contains all responsibilitiesfor which this component is in charge such as adding or removing items in our example.
- In the collaboration section we define on which other components our component depends, the so-called collaborators. In the example, the shopping cart must be able to co-operate with the product catalog.
All of this is simply drawn on a sheet of paper and then visibly put on a white board, poster, whatever is available. After a while the board will be filled up with CRC cards. In order to make the collaborations visible I often use a string for connecting the CRC card to its collaborator(s) using pins.
Because this is a flexible, paper-based solution it is easy to change CRC cards, remove them again, add new ones, add or remove responsibilities or collaborators. Everyone in the team is able to participate in the whole brain storming process.
Obviously, in an agile setting the CRC cards will be incomplete in the beginning and then keep growing over time.
Later on in the design process we might add additional information to the cards such as superclasses.
There is a lot more to say about CRC cards. Ward Cunningham , the "father" of CRC cards, and Kent Beck provided an excellent paper for OOPSLA 1989 that you should definitely read (http://c2.com/doc/oopsla89/paper.html).
No comments:
Post a Comment