10. What is CRC? Class, Responsibility & Collaboration Discovering the real world objects is a system Mapping the collaboration among classes and their responsibilities
11. Why CRC? Uses brainstorming and role-playing to maximize advantages of group work
20. CRC Card 1. Discovering Candidate Classes 1. Read Requirements Documents 2. Clarifying the Scope 2. Underline nouns and noun phrases. 3. Selecting Core Classes 3. Add them to candidate class list. 4. Brainstorm to find other potential classes.
21. The ATM System will interface with the customer through a display screen , numeric and special input keys, a bankcard reader, a deposit slot, and a receipt printer. Customer may make deposits, withdrawals and balance inquires using the ATM machine, but the update of accounts will be handled by an interface to the Accounts system. Customers will be assigned a PIN and clearance level by the security system which will be verified prior to transactions. We would allow customers to update routine information such as change of address or phone number using the ATM. 1.Discovering The Candidate Class List 1. Read Requirements Documents
22. The ATM System will interface with the customer through a display screen , numeric and special input keys, a bankcard reader, a deposit slot, and a receipt printer. Customer may make deposits, withdrawals and balance inquires using the ATM machine, but the update of accounts will be handled by an interface to the Accounts system. Customers will be assigned a PIN and clearance level by the security system which will be verified prior to transactions. We would allow customers to update routine information such as change of address or phone numberusing the ATM. 1. Discovering The Candidate Class List 2. Underline nouns and noun phrases.
45. Clarifying System Scope 29 What is the scope of the ATM system? Questions Does it handle everything? banking application user interface interactions between them Does it.. updates accounting records? records and mediates the transaction activity? Other Possible questions
51. Class that we are NOT able to categorize without knowing the system boundaries and definition 4. Selecting Core Classes To be Reviewed further for categorization
52. Classes that are outsidethe system scope Printer, ScreenSave, and Prompt. Related to the user interface subsystem But not to the core banking application 4. Selecting Core Classes
53. 37 3. Selecting Core Classes Eliminate Unnecessary Classes Architectural Design Issues 1. Identify hot spots 1. Remove ghost classes 2. Use appropriate design patterns 2. Combine synonyms 3. Take advantage of existing software frameworks 3. Distinguish attributes from classes
54. What are Hot Spots? A hot spot is a portion of the system that is likely to change from one system variant to another.
55.
56. Interfaces and the relationships among components will become less prone to changes.Aid in designing components where changes is seldom necessary or constraint to a class
57.
58.
59. Identify hot spots Withdrawal handling is a hot spot. Initially supports the dispensing of cash; future may require update of cash cards. The classes that touch this hot spot include Account, Withdrawal, FundsAvailable, and BankCard.
61. 44 3. Selecting Core Classes Eliminate Unnecessary Classes Architectural Design Issues 1. Identify hot spots 1. Remove ghost classes 2. Use appropriate design patterns 2. Combine synonyms 3. Take advantage of existing software frameworks 3. Distinguish attributes from classes
62. Design Patterns A design pattern is a design structure that has been successfully used in a similar context “No Point Reinventing the Wheel” “Reuse and Adapt existing”
63. Design Patterns Pioneers have laid out the foundations There exist library of patterns Apply them to them to the CRC cards Speed up analysis Application of Design Patterns may result in new classes that are not found during brainstorming
68. 51 3. Selecting Core Classes Eliminate Unnecessary Classes Architectural Design Issues 1. Identify hot spots 1. Remove ghost classes 2. Use appropriate design patterns 2. Combine synonyms 3. Take advantage of existing software frameworks 3. Distinguish attributes from classes
69. Framework A collection of classes that captures the architecture and basic operation of an application system. Systems are created by extending the given classes to add the specialized behaviors.
70. Frameworks are "upside down libraries“. System control resides in framework code that calls "down" to user-supplied code. A blue print for the implementation Framework
71. Example in ATM 54 There are many papers on ATM that has been successfully built These framework can also be standards that existing ATM follows
77. 60 3. Selecting Core Classes Eliminate Unnecessary Classes Architectural Design Issues 1. Identify hot spots 1. Remove ghost classes 2. Use appropriate design patterns 2. Combine synonyms 3. Take advantage of existing software frameworks 3. Distinguish attributes from classes
78. Combine synonyms Use a common name for same items This situation may arise when different groups within an organization use different names to refer to the same thing.
80. Situation based Balance and FundsAvailablemay or may not be different in concepts Example: A policy of disallowing withdrawals for some period after deposit of a check.
81. Caution! Be careful when the same word actually refers to different things! New core classes may be needed.
82. 65 3. Selecting Core Classes Eliminate Unnecessary Classes Architectural Design Issues 1. Identify hot spots 1. Remove ghost classes 2. Use appropriate design patterns 2. Combine synonyms 3. Take advantage of existing software frameworks 3. Distinguish attributes from classes
83. Distinguish attributes from classes Some candidate classes may turn out to represent information only! A candidate class may be an attribute if: It does not have any operations It does not change
If a class depends on upon other classes, to help carry out it’s responsibilities, it will have collaborators written by side the responsibilityIf a card is part of a hierarchy, it may have superclass or subclasses.
If a class depends on upon other classes, to help carry out it’s responsibilities, it will have collaborators written by side the responsibilityIf a card is part of a hierarchy, it may have superclass or subclasses.
Discovering Candidate ClassesRead Requirements DocumentsUnderline nouns and noun phrasesAdd them to candidate class listBrainstorm to find other potential classesClarifying the ScopeSelecting Core ClassesArchitectural DesignIdentify hot spotsUse appropriate design patternsTake advantage of existing software frameworksEliminate Unnecessary ClassesRemove ghost classesCombine synonyms Distinguish attributes from classes
Does it handle everything--Is the ATM responsible for updating accounting records? or just recording and mediating the transaction activity?
Limits its scope to banking information capture -- Leaving the user interface, security and actual account update to other systems.
Pree definition: Specialization (=adaption) takes place at points of predefined refinement that we call hot spots (Pree,1995, 1996, 1997).Predefine refinement aka the framework of the domain.
Hotspot also enables the reuse of the overall system architecture and common code.The Abstract classes of the framework intertwine with hotspots highlighted in grey.
A framework is a collection of classes--some abstract, some concrete--that captures the architecture and basic operation of an application system. Systems are created by extending the given classes to add the specialized behaviors.