16.4. GRASP: Patterns of General Principles in Assigning Responsibilities

To summarize the preceding introduction:

  • The skillful assignment of responsibilities is extremely important in object design.

  • Determining the assignment of responsibilities often occurs during the creation of interaction diagrams, and certainly during programming.

  • Patterns are named problem/solution pairs that codify good advice and principles often related to the assignment of responsibilities.

Question:What are the GRASP patterns?
Answer:They describe fundamental principles of object design and responsibility assignment, expressed as patterns.


Understanding and being able to apply these principles during the creation of interaction diagrams is important because a software developer new to object technology needs to master these basic principles as quickly as possible; they form the foundation of how a system will be designed.

GRASP is an acronym that stands for General Responsibility Assignment Software Patterns.[2] The name was chosen to suggest the importance of grasping these principles to successfully design object-oriented software.

[2] Technically, one should write “GRAS Patterns” rather than “GRASP Patterns,” but the latter sounds better.

How to Apply the GRASP Patterns

The following sections present the first five GRASP patterns:

  • Information Expert

  • Creator

  • High Cohesion

  • Low Coupling

  • Controller

There are others, introduced in a later chapter, but it is worthwhile mastering these five first because they address very basic, common questions and fundamental design issues.

Please study the following patterns, note how they are used in the example interaction diagrams, and then apply them during the creation of new interaction diagrams. Start by mastering Information Expert, Creator, Controller, High Cohesion, and Low Coupling. Later, learn the remaining patterns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.49.252