CSC/ECE 517 Fall 2011/ch4 4i aa
"CRC Card Design Tools"
Class-Responsibility-Collaborator Cards were "invented to document collaborative design decisions."<ref name="beck">"A Laboratory For Teaching Object-Oriented Thinking" by Beck and Cunningham</ref> They are a way to discover classes, determine the responsibilities of each of those classes, and describe their relationships. The information for each class is written on a separate card.<ref name="lecnotes">Lecture Notes</ref>
Introduction
A CRC card is a notecard laid out in a particular fashion where one may define a class, its responsibilities, and collaborators (see figures below). In this definition, a class refers to an object in the traditional object-oriented sense; responsibilities refers to the actions that the object must take; and collaborators refers to the other objects with which the originally defined class must interact.<ref name="skrien">Skrien, Dale John. Object-oriented Design Using Java. Boston: McGraw-Hill Higher Education, 2009. Print.</ref> In other words, the class name of an object "creates a vocabulary for discussing a design," the responsibilities "identify problems to be solved," and collaborators are "object which will send or be sent messages in the source satisfying responsibilities."<ref name="beck"/>
Class-Responsibility-Collaborator cards are an evolution of simple use cases. In such use cases, “actors” would be defined and a “story” of their actions would be written. Extraction of the nouns and verbs in these stories would be leveraged in an effort to help determine the relevant classes and methods.<ref name="skrien"/>
The benefits of CRC cards over other methods of class construction were their portability and ability to design systems without drilling down into low-level details (but having the extensibility to do so if required). Another benefit of CRC cards was their ability to be incorporated into genuine human interactions where developers could role play. In these interactions, developers would be given blank cards and use cases would be acted out. As the use case is performed, classes and actions are written down and refined, ultimately resulting in a comprehensive class definition.
Beck and Cunningham use 4 x 6 inches index cards because they are "cheap, portable, readily available, and familiar." [1]
The physical spacial arrangement of the cards can have informal meaning:
- when cards overlap it can mean that the objects represented by the cards are collaborating.
- a card placed above another card can mean that the object it represents is supervising the object represented by the card below.
- also cards representing parts are usually placed below the card representing the whole
- "refinements of an abstraction can be collected and handled as a single pile of cards with the most abstract card on top where it can represent the rest."[1]
Beck and Cunn.. "suggest driving a design toward completion with the aid of execution scenarios. We start with only one or two obvious cards and start playing "what-if". If the situation calls for a responsibility not already covered by one of the objects we either add the responsibility to one of the objects, or create a new object to address that responsibility. If one of the object becomes too cluttered during this process we copy the information on its card to a new card, searching for more concise and powerful ways of saying what the object does. If it is not possible to shrink the information further, but the object is still too complex, we create a new object to assume some of the responsibilities." [1]
Beck and cunn.. "encourage designers to pick up the card whose role they are assuming while "executing" a scenario and stress the importance of creating objects not to meet mythical future needs, but only under the demands of the moment. This ensures that a design contains only as much information as the designer has directly experienced, and avoids premature complexity." [1]
According to the experience of Beck and Cunn.. "When designers pick up a card they seem to more readily identify with it, and are prepared to deal with the remainder of the design from its perspective. It is the value of this physical interaction that has led Beck and Cunn.. to resist a computerization of the cards."
We are going to evaluate some computerizations of the cards keeping in mind that these tools may not provide the same user experience and ultimately the same design results as the use of physical cards can.
Tools
Stickies
QuickCRC
Visual Paradigm for UML
Conclusion
"Because the designs are so much more concrete, and the logical relationship between objects explicit, it is easier to understand, evaluate, and modify a design.
We were surprised at the value of physically moving the cards around. When learners pick up an object they seem to more readily identify with it, and are prepared to deal with the remainder of the design from its perspective. It is the value of this physical interaction that has led us to resist a computerization of the cards.
The need to retain the value of physical interaction points to the need for a new kind of user interface and programming environment as far beyond what we have today as our current systems are beyond the tool-oriented environments of the past." [1 Beck/Cunningham]
See also
References
<references/>
[1] Beck/Cunningham
[2] CRC Cards: An Agile Thinking Tool
[4] Hot Draw
[5] HyperCard
[6] HyperCard Group
[7] SuperCard
[8] MetaCard
[9] MetaCard Group
[10] Revolution
[11] PhytonCard
[12] FreeCard
[13] FreeCard Group
Aldo [14] Visual Paradigm for UML
Aldo [15] QuickCRC
[17] CRC Card Editor
Aldo [18] Stickies on Mac
[19] Sticky Notes on Windows 7