CSC/ECE 517 Fall 2011/ch4 4i js

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

This Wiki article surveys the various tools that were built to enable CRC card design on a computer. The tools cover both the tools that were developed for commercial purposes as well as the ones that were designed for educational purposes to teach Object Oriented Design.

CRC CARDS

Classes, Responsibilities, and Collaborations (CRC) is a design method focused on creating highly cohesive and modular systems. Classes represent the real world entities. They have responsibilities – data and actions the class has to support. These responsibilities can be filled by the class itself or may collaborate with other classes to fulfill it. CRC cards are 3X5 index cards one for each class. Each has a name and has two columns one for responsibilities and one for collaborators. We can write attributes and description on back of the card. CRC cards help visualize the design and design can be easily modified by just replacing few cards. These can be useful throughout the life cycle and provides a basis for formal analysis and design methodologies. <ref> Using CRC Cards: An Informal Approach to Object-Oriented Development </ref>

Creating CRC Cards

CRC Cards help in getting the design right. CRC cards are generated as follows: 1. Discover Classes 2. Determine Responsibilities of each class 3. Describe relationship among each class.

Discover Classes:The nouns in requirement document translate to classes. We enforce certain rules while choosing classes. Identified Class is a singular noun or one that does not have functionality as some other class or is not simply a primitive type.

Determine Responsibilities: Responsibilities are the things that class knows or can do. Verbs in requirements document translate to responsibilities.

Describe Collaborators: Class might need other classes to fulfill certain responsibilities. Those classes can be identified as the collaborators for this class.


<ref>CRC Card Layout </ref>


The above CRC card describes the class Shopping Cart. A shopping cart must be able to add items and remove items form it so they become responsibilities of that class. It has to collaborate with Product Catalog to add and remove items so Product Catalog becomes collaborator to Shopping Cart

Disadvantages of Paper CRC cards

  • Modification of data in hand written cards is difficult.
  • The information on cards needs to be transferred into an electronic medium in order to be used by software development tools.
  • As the size of the project grows it’s difficult to maintain CRC cards.
  • Difficult to communicate between teams.
  • Time consuming.

Advantages of a CRC card tool

  • Easy to maintain cards even as project grows in size.
  • It can graphically illustrate relationship between cards.
  • New cards can be defined for undefined super classes, subclasses etc.
  • Information can be easily entered, updated, deleted.
  • Information can be verified easily.
  • When renaming a card information on other cards is easily updated.
  • Easy to communicate these electronic cards between teams

CRC Card Tools

Quick CRC

QuickCRC <ref> QuickCRC</ref> is a commercial tool developed by Excel Software for designing object-oriented software. It can be used on Mac OS X or Windows.The process of designing a program using QuickCRC involves creating a card for each class, establishing relationships, assigning responsibilities and attributes, defining and simulating scenarios, checking the model for errors and illustrating interesting relationships between objects.

Quick CRC Tool
Quick CRC Tool

A few features supported by this tool are:

  • Super and subclasses can be added by selecting from a pop up list of existing cards or by typing the name.
  • Provides namespace support for partitioning the cards into different functional areas which can be used while listing specifications, printing cards or exporting information to other tools.
  • It can generate the inheritance graphs form the information on the CRC cards.
  • Linking cards and scenarios to foreign documents is made easy and thus they can be easily accessed with a single click of the mouse.
  • Allows the creation and simulation of scenarios which allows the early identification and correction of bugs.
  • The designer can show the attribute access of each card responsibility. QuickCRC automatically graphs the attribute access to highlight attribute usage and incomplete areas of the design and thus allows in locating design problems.
  • Information can be imported from other development tools and thus we can generate CRC cards from source code with WinTranslator or MacTranslator.
  • Information can be exported to other development tools as the CRC cards can be exported to MacA&D, WinA&D or QuickUML to auto-generate UML class diagrams.
  • It can generate a text or HTML coding specification, generate cards, attributes and responsibilities from selected words in a text file or selectively print CRC cards for a peer review. Design work is saved as an XML file.

ECoDE (Ectropic Collaborative Design Environment)

The Ectropic Collaborative Design Environment, ECoDE<ref> ECoDE K. A. Gray, M. Guzdial, and S. Rugaber. Extending CRC cards into a complete design process. Technical report, College of Computing, Georgia Institute of Technology, Atlanta, GA, 2002. </ref>, is a development tool designed to capture two key components of Ectropic design: Collaborations (CRC Cards) and Scenarios. ECoDE includes a graphical user interface targeting novice software designers and attempts to present an environment that couples the flexible and modular structure of well-designed object-oriented software and perspicuity of functionally organized software.The main interface called the Ectropic Design Navigator consists of two tools namely The CRC Card Navigator and the Scenarios Navigator. The design process consists of three phases:

ECoDE
ECoDE

Analysis mode: This phase involves identifying and analyzing the program goals, identifying candidate classes to meet them, determining the responsibilities and distributing them among the candidate classes. It also involves creating scenarios for identifying the required responsibilities and building Scenarios from a sequence of CRC Card Responsibility pairs.

Design mode: This phase aims at designing a complete and implementable design. It involves reviewing each CRC card and assigning a corresponding method to each responsibility assigned to the card. In this mode the designer can create, categorize, and describe methods and match them with specific responsibilities apart from the tasks available in the analysis phase.

Program Phase: In this phase the tool checks all the CRC cards and makes sure that all the responsibilities have been assigned their corresponding methods. This allows in fixing deficiencies. It also provides the ability to convert CRC cards to actual Classes after which it asks the designer to provide attributes for the class and generates source code stubs which can then be completely implemented by the designer.

CRC Design Assistant

The CRC Design assistant<ref>CRC Design Assistant A Tool to Support the CRC Design Method </ref> is a freely available software tool that was developed to make the CRC design process easy for students. The system consists of a simple Access database and a set of classes. The database stores the design information for the classes, responsibilities, collaborations, contracts, subsystems, users, and documentation.

CRC Design Assistant
CRC Design Assistant

Some of the important features of this tool are:

  • The CRC view has index cards scattered around the workspace. It uses drag-and-drop to make changes to a design. Dragging one card into another automatically makes changes to both the classes. This ensures that changes in the design are consistent.
  • The CRC view also makes identifying classes with too many responsibilities easier and also helps in identifying classes that are too interconnected with the rest of the system.
  • The tool provides automatic documentation for the application design. The document is in rich text format (RTF) which can be opened with Microsoft Word or WordPerfect.
  • It generates comma separated variable (CSV) files that can be opened with Microsoft Visio to create CRC diagrams and object diagrams.
  • Lines are drawn to represent collaborations between classes thus making it easy to visualize the extent of coupling in the system.
  • Allows the designer to view the design at different levels of complexity by providing support for subsystem abstraction and grouping classes performing related tasks into a subsystem.
  • It allows us to handle the growth in workspace by providing an option to print the CRC cards from the database and use the traditional approach and update the database after a work session. We could also use a projector or an electronic whiteboard for the same.

Visual Paradigm for UML

Visual Paradigm for UML<ref> Visual Paradigm </ref> is a CASE tool for UML diagrams. It supports thirteen types of diagrams.Type of diagram can be selected from Diagram navigator. The option to select CRC card diagram is found under requirements capturing tab.Selecting a new CRC card diagram opens up a new diagram toolbar. We can create cards by selecting CRC Card from diagram tool. A new CRC card appears on screen. The properties have to be edited. We can edit Card name (class name), Super classes, sub classes, its attributes, its responsibilities and its collaborators. Attributes and responsibilities may be added by right clicking on attributes or responsibilities heading and click on add attribute or responsibility. Name of attribute and description can be entered and while entering responsibility Name and its collaborator are entered.

Easy CRC

EasyCRC<ref>EasyCRC A. Raman, S. Tyszberowicz. The EasyCRC Tool, 2nd international conference on Software Engineering Advances (ICSEA), France, 2007 </ref> combines CRC cards and sequence diagrams. It is originally developed to teach Object oriented paradigm. Most of UML tools don’t include CRC cards and diagrams which give conceptual view of the system rather they focus more on implementation view of the system. EasyCRC is the only tool that focuses on CRC cards and scenarios. If any changes occur to sequence diagrams we can make changes to CRC diagrams as well. It also provides a text editor where the description can be copy pasted and the tool picks out the noun in the description and lists them. We can select the most appropriate nouns from the list and add them to the noun list. We can also select the words that were not listed by the tool by highlighting the word and adding it to noun list.There are two ways to update the responsibilities and collaborators in CRC diagram. First one is we enter all the values manually. The other method is to draw the sequence diagrams first and from these diagrams the responsibilities and collaborators of a class would be identified and updated.

Interactive 3D CRC Cards (Flying Circus)

In general 2D diagrams, it is difficult to see the entire diagram and its collaborators. This restricts the process of understanding the diagram and coming up with new collaborators. To avoid these a CRC card diagram can be drawn in a 3D space. Flying Circus<ref> 3DCRC VERY RAPID SOFTWARE-DESIGN PROTOTYPING WITH INTERACTIVE 3D CRC CARDS </ref> is an automated 3D tool that aids the technique of CRC card design. CRC cards can be created, modified and placed in a 3D environment. The collaborations between the classes can be shown by links between the classes. Cards can be of different sizes, can use different colors and have comments included in it. Different colors make the easily visible however small the card may be. Flying circus is built out of open source projects like OpenSceneGraph(OSG), libsigc++, Flex etc. Flying circus provides functionality like creating CRC card, deleting a CRC card, collaborators update, change of information on CRC card, change of properties of CRC cards, 3D Manipulators to position it at a desired place in 3D space.

Merobase Component Finder

It is an online software search engine. It supports simple text based search , interface search , module lookup. The software can be searched and reused. The query is searched in various sources like SourceForge etc. Merobase allows user to define a CRC card and searches its database for matching components and displays it to user. He can reuse the cards and software associated with it. <ref> merobase </ref>

Software Ideas Modeler

Software Ideas Modeler <ref> Software Ideas Modeler </ref> is a light weight tool that supports 14 types of UML diagrams. On starting the tool it shows all the 14 type of diagrams it supports and asks to choose one among them. After selecting CRC diagram, a diagram toolbox is opened. From there we can select a new CRC card or a link and few other shapes are also provided. When a new CRC card is added, the name can be changed by clicking the name box. The propertied can be edited by double clicking the crc card. This opens up a property pop up box. All the required details can be filled up. At the bottom of CRC a 2 plus symbols is green color are provided. One is to add collaborator and the other one is to add responsibility. A comment button is also provided. All CRC cards can be created and collaborating cards can be linked using a link from diagram tool box.

Conclusion

These are the tools currently available for CRC card design on a computer. Selection of any particular tool can be done by choosing the one which best satisfies our need. The only problem however with using tools for CRC card design is that it is not always best for more than two people to work on the same computer.

See also

  1. Unified Modeling Language
  2. MetaModeling
  3. CRC and Scenario
  4. Object Oriented Thinking
  5. Requirement Analysis
  6. Software Design Using CRC Cards

References

<references> </references>