CSC/ECE 517 Fall 2007/wiki2 5 as: Difference between revisions
No edit summary |
No edit summary |
||
Line 48: | Line 48: | ||
<h4>For a class of students via in-class exercises</h4> | <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.<br/> | [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 - gives a step by step procedure on how to execute CRC sessions in class.<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.<br/> |
Revision as of 20:00, 29 October 2007
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
CRC – Class, Responsibility, Collaborators model was proposed by Kent Beck and Ward Cunningham in their paper “A Laboratory for Teaching Object-Oriented Thinking” released in OOPSLA ’89. In their paper they discuss about 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 – 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.
- 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 whom 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 detail description about why the CRC cards were introduced and it also addresses all 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 Collaborators(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.
CRC for O-O languages
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 –
http://weblog.rubyonrails.org/2006/6/14/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
http://rohan.sdsu.edu/~stewart/cs310-fall07/Ch03v2.0.ppt.
The page talks about how CRC is implemented in Java.
Small Talk
http://www.d.umn.edu/~gshute/ood/accounts/home.html - The page talks about a bank account application. It has provided the CRC cards for the various classes involved in the application and the corresponding small talk code for that.
CRC Exercises
Interactively over the 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 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.
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.
Self-Study
http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/crc_b/ - good tutorial for self-study.
http://www.cs.gordon.edu/courses/cs211/ATMExample/CRCCards.html - an example of CRC card for ATM application.
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 - paper by Kent Beck and Ward Cunningham
2. Object Oriented Analysis and Design Using CRC Cards - Nils Brummond
3. Class-Responsibility-Collaborations Card - Wikipedia