1. Information Expert |
Problem: What is a basic principle by which to assign responsibilities to Objects ? Solution: Assign a responsibility to the class that has the information needed to fulfill it. Merit: The informations are encapsulated. The module coupling between classes becomes lower. The informations are dispersed and understandable. And the class that the module cohesion is high is defined. Related patterns:Low Coupling Pattern , High Cohesion Pattern |
2. Creator |
Problem: Who should be responsible for creating a new instance of some class ? Solution: Assign class B the responsibility to create an instance of class A if one of these is true (the more the better):
Merit: The module coupling between classes becomes lower. Related patterns: Low Coupling Pattern |
3. Controller |
Problem: What first object beyond the UI layer receives and coordinates ("controls") a system operation ? Solution: Assign the responsibility to a class representing one of the following choices:
|
4. Low Coupling |
Problem: How to support low dependency, low change impact, and increased reuse ? Solution: Assign a responsibility so that coupling remains low. Merit: The class is more independent from the change of the other classes. The class is more understandable. The classes are more reusable. Related patterns: Protected Variations Pattern |
5. High Cohesion |
Problem: How to keep objects focused, understandable, and manageable, and as a side effect, support Low Coupling ? Solution: Assign a responsibility so that cohesion remains high. Merit: The clearness and understandability of the design is higher. The maintenance and enhancing is easier. The module coupling between classes becomes lower. |
6. Polymorphism |
Problem: How to design the choices which is dependent by the class ? Solution: The same name operations (methods) in the difference classes is defined. And assign a responsibility to the class the class that the behavior is changed. Merit: When the variation ( choice ) increases newly, it is possible to enhance it easily. Related patterns: Protected Variations Pattern. There are related patterns in Gang of Four Design Patterns. |
7. Pure Fabrication |
Problem: How to become higher cohesion and lower coupling ? (When it doesn't go well in other pattern ) Solution: Define a class for convenience' sake that doesn't express the concept of the problem area at all. Merit: The module cohesion of the class is higher. The classes are more reusable. Related patterns: Low Coupling Pattern , High Cohesion |
8. Indirection |
Problem: To de-couple objects so that Low coupling is supported and reuse potential remains high? Solution: Assign the responsibility to an intermediate object to mediate between other components or services, so that they are not directly coupled. Merit:The module coupling between classes becomes lower. Related patterns:Protected Variations Pattern , Low Coupling Pattern , Pure Fabrication Pattern. There are related patterns in Gang of Four Design Patterns. |
9. Protected Variations |
Problem:How can we design objects , subsystems and systems such that the variations in these do not have an undesirable impact on other elements in the system? Solution: Assign responsibility to create a stable interface around an unstable or predictably variable subsystem or component. Merit: When the variation increases newly, it is possible to enhance it easily. The module coupling between classes becomes lower. Related patterns: There are a lot of related pattern in the GoF design patterns. |
No. |
Linked Website Name |
Description |
Linked date |
1 | GRASP - Designing Objects with Responsibilites - A Methodical Approach to Basic OO Design | This page introduces the GRASP Pattern. | August 15, 2010 |
2 | GRASP patterns | This page introduces the GRASP Pattern. | August 15, 2010 |
3 | GRASP Patterns | This page introduces the GRASP Pattern. | August 15, 2010 |
4 | GRASP (Object Oriented Design) | This page introduces the GRASP Pattern. | August 15, 2010 |
No. |
Author |
Book Name |
ISBN |
1 | Craig Larman | Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) | 978-0131489066 |