Tutorial


Getting Started

Definitions
Choosing the Group
When conducting a CRC session, a group of participants is needed. Selecting a group should be carefully made. Characteristics of a good group can be narrowed down to three categories: size, participants, and dynamics.

The group size for a CRC session should be around five or six participants. Larger groups tend to have differences in views among the participants. Also the number of disagreements increases because the number of potential paths of communication increases as the number of participants grow.

Two kind of participants should attend every CRC session. There are a domain expert and a object-oriented technology facilitator. Also there is a question of whether allowing a manager to attend, but for the tutorial, we will exclude the manager from our CRC session.

The domain expert should understand what the system should do and accomplish. Also he or she should help create the different scenarios and to choose what classes are problem-related. A good person for the domain expert is the author of the requirements document.

The object-oriented technology facilitator should have more experience than others in the group about the object-oriented approach. He or she can aid the CRC session by choosing good classes with meaningful names and minimal but sufficient set of responsibilities. The facilitator should be domain ignorant and help bring up some insightful questions about the application.

The group dynamics should bring together participants who have common goals and agendas, work well together, not dominanted by one or few of the members, and respect each other.

Usually the CRC session will be doomed if the group dynamics are not good. If the participants do not agree and communicate poorly, the session is bound for failure.


Before the Scenario Execution

  1. The Problem

  2. Brainstorming for Classes

  3. Filtering Classes

  4. Assigning Cards

The Scenario Execution

This is now the heart of the CRC session. We can now start assigning responsibilities to the classes by simulating a scenario. The scenarios to be explored are the "what happens when"s. For example, "What happens when John Barba returns a video, Batman Returns, to Blockbuster?"

The scenarios should be very specific. Also related scenarios should be modeled separately. It might seem tedious to model similar scenarios but many of the necessary responsibilities already exist to fulfill it. The group should always execute easy and nonexceptional scenarios first. Only when a there is a working model of the system should exceptional scenarios be introduced.

The people who hold and own particular cards should hold the card in the air and "become" the object when a scenario causes control to pass to them. When executing scenarios, cards are lifted to simulate the behavior of the system where messages are sent to actual objects performing their tasks. A card is a class when on the table and an object when lifted in the air.

During the scenarios, responsibilities will arise and should be assigned to the necessary card or cards. Also the collaborators should be written down when responsibilities are known. There may be a time when superclasses or subclasses as well as new classes during the scenario execution.

There are no right and wrong ways for scenario executions. Groups should do what makes the CRC session flow good for them.


During the Scenario Execution

  1. Grouping the Cards

  2. Scenario List

  3. Collaboration Drawings

Figure 2.1


After the Scenario Execution

A CRC session can be performed many times on the same system. The group should decide when enough CRC sessions have been executed. Once a stable model is produced, then the group should begin analyzing the model and implementation.

For further record keeping of the CRC session, a automated CRC card technique tool can be used. I have found one from Rational Software Corporation call Rational CRC. This tool should only used as a supplement to the CRC session and not a substitute.

There is a free demo version of Rational CRC at the Rational Software Corporation homepage. If you look in the references section, you will find a link to their page and the setup for the demo is in the System Requirements section. Good luck.