CSC/ECE 517 Fall 2007/wiki2 5 as: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(63 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<center><h1>CRC cards</h1></center>
<h1>CRC cards</h1>


<i>
<i>
Line 6: Line 6:




<h3>Introduction to CRC </h3><br/>
<h3>Introduction to CRC </h3>
<p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;<b><i>CRC</i></b> – Class, Responsibility, Collaborators cards were introduced to teach the concepts of Object Oriented Programming to a procedural programmer. It was proposed by <i>Kent Beck</i> and <i>Ward Cunningham</i> in there paper “A Laboratory for Teaching Object-Oriented Thinking” released in OOPSLA ’89. It is now used to develop object-oriented models. The cards are written based on the system requirements which define the behavior of the system. This model contains a set of index cards which is divided into three sections – <br/>
[[Image:CrcCardLayout.jpg|frame|right|Courtesy: [http://www.agilemodeling.com/artifacts/crcModel.htm CRC Card Layout]]]
<b><i>CRC</i></b> – Class-Responsibility-Collaborators model was proposed by [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] and [http://en.wikipedia.org/wiki/Ward_Cunningham Ward Cunningham] in their paper <i>[http://c2.com/doc/oopsla89/paper.html “A Laboratory for Teaching Object-Oriented Thinking”]</i> released at OOPSLA ’89. Their paper discusses how this approach had been successful in teaching the concept of objects to novice programmers and exposing complicate designs to experienced programmers. Ward Cunningham invented CRC cards for documenting collaborative design decisions, and they also address the problems of portability and system independence. <br/>
The system requirements which define the behavior of the system, serves as a basis for creating CRC cards. A 4" x 6" card is used to write all the information about an object. <br/>
The model contains a set of index cards which is divided into three sections –  
*<i>Class</i> – a collection of similar objects. This section appears on the top of the CRC card and is a singular noun or singular noun phrase.<br/>
*<i>Responsibility</i> – section appears below the class name and gives a bulleted list of the actions which the class is capable of. It identifies the problems that can be solved. This is &nbsp;&nbsp;&nbsp; expressed by active verbs.<br/>
*<i>Collaborators</i> – These are the collection of classes with which the class interacts to complete its actions.
</p><br/><br/>


<li><i>Class</i> – It is a collection of similar objects. This section appears on the top of the CRC card and is a singular noun or singular noun phrase. </li>
There are many links for CRC available on the Web but for a basic understanding of what CRC cards are and how they can be implemented, the following would be the best links to start -<br/>
<li><i>Responsibility</i> – section appears below the class name and gives a bulleted list of the actions which the class is capable of. It identifies the problems that can be solved. This is expressed by active verbs.</li>
<li><i>Collaborators</i> – These are the collection of classes with whom the class interacts to complete its actions.</li>
</p><br/>


The following are the links that can be used to understand what CRC cards are and how they work. These links give a view about certain aspects of CRC.
[http://c2.com/doc/oopsla89/paper.html “A Laboratory For Teaching Object-Oriented Thinking”] is the paper presented by Kent Beck and Ward Cunningham. The paper gives a detailed description about why CRC cards were introduced. It also addresses the issues experienced by programmers during object-oriented thinking and how CRC cards resolve those issues and help the novice programmers and experienced programmers in designing objects. Although it does not provide any example for creating CRC cards, it is the best link to understand the fundamentals of CRC.<br/>
http://c2.com/doc/oopsla89/paper.html - “A Laboratory For Teaching Object-Oriented Thinking” paper by Kent Beck and Ward Cunningham can be found in this link. This link gives a detail explanation about why CRC cards were introduced.
http://www.agilemodeling.com/artifacts/crcModel.htm - This link provides description about CRC models and an example to create CRC cards.
http://www.uow.edu.au/~nabg/PwithC/C11.html - gives a detailed description OO development from Analysis to Implementation.
http://c2.com/doc/crc/draw.html - CRC description of a drawing editor called HotDraw which was written in SmallTalk by Ward Cunningham and Kent Beck.
CRC for O-o languages
Ruby:
Java:
SmallTalk:
http://www.d.umn.edu/~gshute/ood/accounts/home.html - The CRC model and SmallTalk code for a Bank Account application
CRC Exercises
i) Interactive over Web
http://dshaw.com/3x5s/ - Interactive CRC cards that can be edited and saved online during a CRC session.
There are few commercial products like WinTranslator (http://www.excelsoftware.com/wintranslator.html) available for creating CRC cards.


ii) For a class of students via in-class exercises
[http://www.agilemodeling.com/artifacts/crcModel.htm Introduction to Class-Responsibility-Collaborator (CRC) Models] - provides a brief introduction on CRC cards and a few hand drawn CRC cards as an example. Although it does not address most of the details of CRC cards, it gives and iterative step by step procedure on how to create CRC cards. It also has a CRC model containing cards for Student, Professor, Seminar, Building, Room, Transcript, StudentSchedule, Enrollment.<br/>
http://64.233.169.104/search?q=cache:ji81-0SXBcsJ:www.cs.iastate.edu/~cs362/handouts/crc-tutorial.pdf  - gives a step by step procedure on how to execute CRC sessions in class.


iii) Self-Study
[http://www.uow.edu.au/~nabg/PwithC/C11.html OO Developments From Analysis, through Design, to Implementation]- gives a detailed description OO development from Analysis to Implementation. It addresses the issues experienced by programmers while creating the software systems and how these problems can be resolved during the initial stages of software development. Even though the paper does not fully address CRC cards, it gives a brief explanation about the role played by CRC cards during software development. It also describes about how using CRC cards help programmers to identify and document possible classes during the analysis stage. The CRC cards being used here are recommended by Wirfs-Brock et al. The cards are real 5" x 3" record cards where each card identifies a proto-class and helps to add references to superclass and subclass when they have been identified.<br/>
http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/crc_b/ - tutorial for self-study
 
http://www.cs.gordon.edu/courses/cs211/ATMExample/CRCCards.html - an example of CRC card for ATM application
[http://c2.com/doc/crc/draw.html A CRC Description of HotDraw]- shows the first ever CRC cards drawn by Ward Cunningham and Kent Beck. These cards describe HotDraw which is a drawing editor written in SmallTalk. The cards start with creating cards for Model, View and Controller for the application. The figures of hand-drawn CRC cards are self-explanatory and they serve as a very good example for a CRC card model.<br/>
There are a few books available that gives complete description about CRC cards.  
 
The CRC card book (http://www.amazon.com/Card-Book-Addison-Wesley-Object-Technology/dp/product-description/0201895358 ) provides solutions to software design problems using CRC cards. Implementation examples in languages like C++, Java and SmallTalk is also provided.
[http://www.softstar-inc.com/Download/Intro%20to%20CRC.doc Introduction to CRC Cards] is a document published by David M.Rubin gives an elaborate description about CRC, Roles played by the members of the CRC Team like Domain Users, OO Design Analyst, Facilitator, Scribe and Observers, about CRC Session and miscellaneous techniques like CRC Interview.
 
<br/><h3>CRC for O-O languages</h3>
Using CRC cards during the initial stages of software development helps the programmer to get an idea of the main objects that will be collaborating in the application. The basic technique and the benefits of CRC are the same for any OO language but the classes used may differ for different languages. For example, the classes for Ruby and  SmallTalk will involve the Model, View and Controller.<br/>
 
<h4>Ruby</h4>
CRC cards can be used in language like Ruby where there are a huge number of constraints to make things simpler. It can be used both for gathering requirements and for designing purpose. As a simple design aid, we can have one CRC card for one controller, its responsibilities and its interactions with other controllers listed on the card. Different designers while working together, also get help in the sense that they get a common platform to explain and understand all the designs involved. A good link for CRC exercise in Ruby can be found here –
[http://weblog.rubyonrails.org/2006/6/14/remember-crc-cards Riding Rails: Remember CRC cards?] -The page talks about briefly of CRC and has comments from people where they have talked about how they have implemented CRC in Ruby projects.
 
<h4>Java</h4>
[http://www.linuxtopia.org/online_books/programming_books/thinking_in_java/TIJ318_004.htm Thinking in Java - Phase 2: How will we build it?] is a part of "Thinking in Java"(3rd ed. Revision 4.0) where it describes the usage of CRC cards while developing a software in Java. The Phase 2 of the Analysis and Design stage requires a design that will describe what the classes look like and how they will interact. It describes how CRC cards can be used to run a live simulation by solving one scenario at a time, by deciding what messages need to be sent to the various objects inorder to satisfy the scenario.
 
[http://rohan.sdsu.edu/~stewart/cs310-fall07/Ch03v2.0.ppt. CRC Cards in Java]<br/>
The page talks about how CRC is used to develop Java Applications. Though the presentation covers more about the concepts of Java, it gives a brief overview about the CRC cards too. It gives a small description of what each component should include. The talk about CRC is on slide no.27 and 28 of the presentation. <br/>
 
<h4>Small Talk</h4>
[http://www.d.umn.edu/~gshute/ood/accounts/home.html CRC Cards for Bank Accounts] - The page talks about building CRC cards for the classes created to implement a bank account application. It has provided the CRC cards for the various classes involved in the application. Each card contains details about the class description, responsibilities, super classes, subclasses,instance variables and the methods involved for that particular class. It also provides the corresponding small talk code for the application.<br/>
 
<br/><h3>CRC Exercises</h3>
 
<h4>Interactively over the Web</h4>
[http://dshaw.com/3x5s/ CRC Demo]- This site provides interactive CRC cards that can be edited and saved online during a CRC session. This provides a good online practice exercise. Instead of using hard copy CRC cards, the user can use these online cards and enter data in these cards by double clicking on Class Name, Responsibilities and Collaborators field.<br/>
There are few commercial products like [http://www.excelsoftware.com/wintranslator.html WinTranslator] available for creating CRC cards.
 
<h4>For a class of students via in-class exercises</h4>
 
[http://portal.acm.org/citation.cfm?id=1094973 Improving CRC-card Role-Play with Role-Play Diagrams] is a paper written by Jürgen Börstler and it discusses about the problems and issues experienced when teaching CRC-cards to novices. The author recommends the usage of Role Play Diagrams to make CRC-approach a better learning or design experience. He says that teaching and learning Role Play Diagrams adds only little overhead to the overall CRC-approach and the proposed diagram is also useful for professional software development.<br/>
 
[http://64.233.169.104/search?q=cache:ji81-0SXBcsJ:www.cs.iastate.edu/~cs362/handouts/crc-tutorial.pdf CRC Tutorial] - This link gives an example of how an in class activity could be performed for teaching the concept of CRC. It gives a step by step procedure of implementing the exercise and lists all the important points for each phase.<br/>
 
<h4>Self-Study</h4>
[http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/crc_b/ Object Oriented Analysis and Design using CRC Cards]- This tutorial gives a brief description about CRC cards and various activites for a CRC card session. The author describes the usage of CRC cards at the Analysis and Design Stage.<br/>
 
[http://www.cs.gordon.edu/courses/cs211/ATMExample/CRCCards.html CRC Cards for ATM Example]- provides an example of CRC card for ATM application. The page displays different links for ATM application. Each link represents each class which is a part of the ATM application.The objects are divided into Boundary objects, Controller Objects and Entity Objects.<br/>
 
There are a few books available that gives complete description about CRC cards. <br/>
The [http://www.amazon.com/Card-Book-Addison-Wesley-Object-Technology/dp/product-description/0201895358 CRC card book] provides solutions to software design problems using CRC cards. Implementation examples in languages like C++, Java and SmallTalk are also provided.<br/>
 
<h3>References</h3>
1. [http://c2.com/doc/oopsla89/paper.html A Laboratory For Teaching Object-Oriented Thinking] - Kent Beck and Ward Cunningham <br/>
2. [http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/crc_b/ Object Oriented Analysis and Design Using CRC Cards] - Nils Brummond <br/>
3. [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaborations Card]<br/>
4. [http://www.cs.unc.edu/~stotts/COMP145/CRC/papers/wilkinson.html An Informal Approach - Documenting a CRC Card Design] - Nancy M. Wilkinson<br/>
5. [http://www.math-cs.gordon.edu/courses/cs211/ATMExample/ClassLinks.html ATM Simulation Links - By Class]<br/>
6. [http://www.bookrags.com/wiki/Class-Responsibility-Collaboration_card# Class-Responsibility-Collaboration Cards(CRC Cards)]<br/>
7. [http://www.mcs.vuw.ac.nz/research/design1/2000/papers/rbiddle.htm Exploring Techniques for Active Learning of OO Design]

Latest revision as of 01:01, 8 September 2010

CRC cards

    CRC cards. Hundreds of Web pages cover CRC cards. Which explain them best? Which explain them in the context of specific languages, e.g., Ruby and Java? Which exercises can be used to teach them best, (i) interactively over the Web, (ii) to a class of students, via in-class exercises, (iii) for self-study?


Introduction to CRC

Courtesy: CRC Card Layout

CRC – Class-Responsibility-Collaborators model was proposed by Kent Beck and Ward Cunningham in their paper “A Laboratory for Teaching Object-Oriented Thinking” released at OOPSLA ’89. Their paper discusses how this approach had been successful in teaching the concept of objects to novice programmers and exposing complicate designs to experienced programmers. Ward Cunningham invented CRC cards for documenting collaborative design decisions, and they also address the problems of portability and system independence.
The system requirements which define the behavior of the system, serves as a basis for creating CRC cards. A 4" x 6" card is used to write all the information about an object.
The model contains a set of index cards which is divided into three sections –

  • Class – a collection of similar objects. This section appears on the top of the CRC card and is a singular noun or singular noun phrase.
  • Responsibility – section appears below the class name and gives a bulleted list of the actions which the class is capable of. It identifies the problems that can be solved. This is     expressed by active verbs.
  • Collaborators – These are the collection of classes with which the class interacts to complete its actions.



There are many links for CRC available on the Web but for a basic understanding of what CRC cards are and how they can be implemented, the following would be the best links to start -

“A Laboratory For Teaching Object-Oriented Thinking” is the paper presented by Kent Beck and Ward Cunningham. The paper gives a detailed description about why CRC cards were introduced. It also addresses the issues experienced by programmers during object-oriented thinking and how CRC cards resolve those issues and help the novice programmers and experienced programmers in designing objects. Although it does not provide any example for creating CRC cards, it is the best link to understand the fundamentals of CRC.

Introduction to Class-Responsibility-Collaborator (CRC) Models - provides a brief introduction on CRC cards and a few hand drawn CRC cards as an example. Although it does not address most of the details of CRC cards, it gives and iterative step by step procedure on how to create CRC cards. It also has a CRC model containing cards for Student, Professor, Seminar, Building, Room, Transcript, StudentSchedule, Enrollment.

OO Developments From Analysis, through Design, to Implementation- gives a detailed description OO development from Analysis to Implementation. It addresses the issues experienced by programmers while creating the software systems and how these problems can be resolved during the initial stages of software development. Even though the paper does not fully address CRC cards, it gives a brief explanation about the role played by CRC cards during software development. It also describes about how using CRC cards help programmers to identify and document possible classes during the analysis stage. The CRC cards being used here are recommended by Wirfs-Brock et al. The cards are real 5" x 3" record cards where each card identifies a proto-class and helps to add references to superclass and subclass when they have been identified.

A CRC Description of HotDraw- shows the first ever CRC cards drawn by Ward Cunningham and Kent Beck. These cards describe HotDraw which is a drawing editor written in SmallTalk. The cards start with creating cards for Model, View and Controller for the application. The figures of hand-drawn CRC cards are self-explanatory and they serve as a very good example for a CRC card model.

Introduction to CRC Cards is a document published by David M.Rubin gives an elaborate description about CRC, Roles played by the members of the CRC Team like Domain Users, OO Design Analyst, Facilitator, Scribe and Observers, about CRC Session and miscellaneous techniques like CRC Interview.


CRC for O-O languages

Using CRC cards during the initial stages of software development helps the programmer to get an idea of the main objects that will be collaborating in the application. The basic technique and the benefits of CRC are the same for any OO language but the classes used may differ for different languages. For example, the classes for Ruby and SmallTalk will involve the Model, View and Controller.

Ruby

CRC cards can be used in language like Ruby where there are a huge number of constraints to make things simpler. It can be used both for gathering requirements and for designing purpose. As a simple design aid, we can have one CRC card for one controller, its responsibilities and its interactions with other controllers listed on the card. Different designers while working together, also get help in the sense that they get a common platform to explain and understand all the designs involved. A good link for CRC exercise in Ruby can be found here – Riding Rails: Remember CRC cards? -The page talks about briefly of CRC and has comments from people where they have talked about how they have implemented CRC in Ruby projects.

Java

Thinking in Java - Phase 2: How will we build it? is a part of "Thinking in Java"(3rd ed. Revision 4.0) where it describes the usage of CRC cards while developing a software in Java. The Phase 2 of the Analysis and Design stage requires a design that will describe what the classes look like and how they will interact. It describes how CRC cards can be used to run a live simulation by solving one scenario at a time, by deciding what messages need to be sent to the various objects inorder to satisfy the scenario.

CRC Cards in Java
The page talks about how CRC is used to develop Java Applications. Though the presentation covers more about the concepts of Java, it gives a brief overview about the CRC cards too. It gives a small description of what each component should include. The talk about CRC is on slide no.27 and 28 of the presentation.

Small Talk

CRC Cards for Bank Accounts - The page talks about building CRC cards for the classes created to implement a bank account application. It has provided the CRC cards for the various classes involved in the application. Each card contains details about the class description, responsibilities, super classes, subclasses,instance variables and the methods involved for that particular class. It also provides the corresponding small talk code for the application.


CRC Exercises

Interactively over the Web

CRC Demo- This site provides interactive CRC cards that can be edited and saved online during a CRC session. This provides a good online practice exercise. Instead of using hard copy CRC cards, the user can use these online cards and enter data in these cards by double clicking on Class Name, Responsibilities and Collaborators field.
There are few commercial products like WinTranslator available for creating CRC cards.

For a class of students via in-class exercises

Improving CRC-card Role-Play with Role-Play Diagrams is a paper written by Jürgen Börstler and it discusses about the problems and issues experienced when teaching CRC-cards to novices. The author recommends the usage of Role Play Diagrams to make CRC-approach a better learning or design experience. He says that teaching and learning Role Play Diagrams adds only little overhead to the overall CRC-approach and the proposed diagram is also useful for professional software development.

CRC Tutorial - This link gives an example of how an in class activity could be performed for teaching the concept of CRC. It gives a step by step procedure of implementing the exercise and lists all the important points for each phase.

Self-Study

Object Oriented Analysis and Design using CRC Cards- This tutorial gives a brief description about CRC cards and various activites for a CRC card session. The author describes the usage of CRC cards at the Analysis and Design Stage.

CRC Cards for ATM Example- provides an example of CRC card for ATM application. The page displays different links for ATM application. Each link represents each class which is a part of the ATM application.The objects are divided into Boundary objects, Controller Objects and Entity Objects.

There are a few books available that gives complete description about CRC cards.
The CRC card book provides solutions to software design problems using CRC cards. Implementation examples in languages like C++, Java and SmallTalk are also provided.

References

1. A Laboratory For Teaching Object-Oriented Thinking - Kent Beck and Ward Cunningham
2. Object Oriented Analysis and Design Using CRC Cards - Nils Brummond
3. Class-Responsibility-Collaborations Card
4. An Informal Approach - Documenting a CRC Card Design - Nancy M. Wilkinson
5. ATM Simulation Links - By Class
6. Class-Responsibility-Collaboration Cards(CRC Cards)
7. Exploring Techniques for Active Learning of OO Design