The team has identified the tasks for the first iteration and are about ready to go to work on it. Before we continue, we pause to have a quick design session where the major classes of the application are identified. The design session is done collaboratively with several, if not all, team members present.
For this session we elect to use CRC-cards (Class, Responsibility, and Collaboration). We walk through the scenario that we are about to implement and try to find the major classes involved. Where possible we try to use terminology from the system metaphor that we decided to use for describing the system. We write the name of those classes along with their responsibilities. Finally, we walk through one or two scenarios and try to see how the classes interact and write down the collaborators of the classes on the cards as well.
Looking at the acceptance test for the current story, we end up with the following set of cards:
The team sits around a table with the cards created so far spread out, each time a class is mentioned someone lifts up that card and holds it for everyone to see. If a new class is needed, a new card is created. If a class is no longer needed its card is ripped up and thrown away.
For the scenario of connecting two applications the discussion can go something like this:
- The calling application is started and an instance of
Subscriberis created (The subscriber card is lifted up by one of the participants). - The
Subscribercreates an instance ofCallReceiverand tells it to start listening for calls (both cards are held up). - Here someone notices that we need to store information about how to reach a subscriber somewhere. Probably the IP-address and port where this application receives connections. We make a note of this, but we don’t feel we need to decide exactly what class holds that data at this point.
- The called application is started and the same scenario as above is repeated
- The
Subscriberin the calling application makes a call to the called application by creating aConversationclass (cards in the air). - Someone points out that we need the know how to reach the called application as well. This information needs to be stored somewhere. We make a note of that and move on.
- The
CallReceiverin the called application detects the incoming request and creates aConversationclass that will match the one on the calling side. TheConversationis passed along to theSubscriberclass, which in turn notifies theConsoleclass about the new conversation. - The
Subscriberclass in the calling application notifies itsConsoleabout the newConversation - In both applications the
Consoleclass displays a message that indicates that we have a conversation started.
After the team has been through this a few more times, should have enough information to start implementing the design. At any time the design can be revisited if deemed necessary.
Highlights
- Design is a collaborative effort. Everybody on the team is involved in the discussions and walk away with a pretty good understanding of the design.
- This lessens the need for some of the intra-team documentation needed. If every developer designs her part of the application in isolation, there probably will be a greater need for documentation and formal reviews in order to get input and spread knowledge. The argument for dividing the design up usually is that of efficiency. You can cover more ground if you work in parallel. I believe that the raise in cost of communication that follows will hurt you in the end though.
- The level of the design artifact is at a level that all of the team members can understand and comment on. Developers, customers, technical editors, and QA people, etc.
- Using cards, ripping them up, moving them around, and pointing to them during discussions is a more tactile approach than working in a UML-drawing tool or even drawing on a whiteboard. I’d think this is a positive thing for the overall understanding in the team. In design sessions where the whiteboard is used directly without cards, there is not room for more than one or two people up at the board at the time. This can lead to one or two of the stronger wills in the room to high jacking the meeting, not leaving enough room for everyone to air their opinions.
- This does not replace the use of UML diagrams or other forms of formal documentation and reviewing, if those are necessary.
- The session aims to create a design that is suitable for the stories at hand. We will refine that design as new stories are planned. If we don’t have enough buy in from the organization that this is possible. These kind of exercises will most probably fail.
Let’s start implementing…




Filed under:
Recent Blog Entries
