In: Computer Science
Write a two-page summary of this important paper on CRC cards (Class, Responsibility & Collaboration) by Cunningham and Beck. Especially discuss the importance of this technique with the MODEL-VIEW-CONTROLLER design pattern.
A Class Responsibility Collaborator (CRC) model is an assortment of standard record cards that have been separated into three areas. A class speaks to an assortment of comparative object, a duty is something that a class knows or does and a teammate is another class that a class interfaces with to satisfy its obligations.In spite of the fact that CRC cards were initially presented as a strategy for showing object oriented concepts, they have additionally been effectively utilized as an undeniable demonstrating procedure. CRC models are a staggeringly viable apparatus for reasonable displaying just as for detailed design. CRC cards highlight noticeably in outrageous Programming as a design procedure.
A class represents to an assortment of comparable objects. An object is an individual, place, thing, occasion, or idea that is pertinent to the current framework. For instance, in a college framework, classes would speak to understudies, tenured educators, and courses. The name of the class shows up over the head of a CRC card and is regularly a solitary thing or particular thing phrase, for example, Student, Professor, and Seminar. Utilize solitary names on the grounds that each class speaks to a summed up adaptation of a particular article. The data about an understudy depicts a solitary individual, not a gathering of individuals. In this way, it bodes well to utilize the name Student and not Students. Class names ought to likewise be straightforward. For instance, which name is better: Student or Person who takes classes?
A duty is whatever a class knows or does. For instance, understudies have names, locations, and telephone numbers. These are the things an understudy knows. Understudies likewise select classes, drop courses, and solicitation records. These are the things an understudy does. The things a class knows and comprises its duties. Significant: A class can change the estimations of the things it knows, however it can't change the estimations of what different classes know.
At times a class has a duty to satisfy, yet not have enough data to do it. For instance, understudies take a crack at courses. To do this, an understudy has to know whether a spot is accessible in the workshop and, assuming this is the case, he then should be added to the course. Be that as it may, understudies just have data about themselves, and not about workshops. What the understudy needs to do is team up/cooperate with the card marked Seminar to pursue a course. In this manner, Seminar is remembered for the rundown of colleagues of Student.
Iteratively perform the following steps for creating CRC model:
Discover classes
Discovering classes is generally an investigation task since it manages recognizing the structure blocks for your application. A decent dependable guideline is that you should search for the three-to-five fundamental classes immediately, for example, Student, Seminar, and Professor. In some cases incorporate UI classes, for example, Transcript and Student Schedule, both are reports, in spite of the fact that others will adhere to simply element classes. Additionally, I'll once in a while incorporate cards speaking to entertainers when my partners are battling with the idea of an understudy in reality (the entertainer) versus the understudy in the framework (the substance).
Discover obligations
You ought to ask yourself what a class does just as what data you wish to keep up about it. You will frequently recognize a duty regarding a class to satisfy a joint effort with another class.
Characterize collaborators
A class regularly doesn't have adequate data to satisfy its duties. Thusly, it must team up (work) with different classes to take care of business. Cooperation will be in one of two structures: a solicitation for data or a solicitation to play out an errand. To recognize the teammates of a class for every duty ask yourself "does the class have the capacity to satisfy this obligation?". In the event that not, at that point search for a class that either can satisfy the missing usefulness or the class which ought to satisfy it. In doing so you'll regularly find the requirement for new duties in different classes and possibly the requirement for another class or two.
Move the cards around
To improve everybody's comprehension of the framework, the cards ought to be put on the table in a keen way. Two cards that team up with each other ought to be set near one another on the table, while two cards that don't work together ought to be put far separated. Besides, the more two cards work together, the closer they ought to be on the work area. By having cards that team up with each other near one another, it's more clear the connections between classes.