CSC/ECE 517 Fall 2010/ch7 7b JB
Information Expert Pattern
Introduction
Information Expert Pattern is a principle for assigning responsibility in object-oriented design. The fundamental idea is to identify the class with the most information (expertise) and assign responsibility to it.
GRASP
In object-oriented design, the overall problems of assigning responsibility are dealt with by GRASP[1], or General Responsibility Assignment Software Patterns (or Principles). GRASP has nine principles, of which Information Expert is one. The others are:
- Creator [2]
- Low Coupling [3]
- High Cohesion [4]
- Controller [5]
- Polymorphysm [6]
- Pure Fabrication [7]
- Indirection [8]
- Protected Variations [9]
Process
Using this approach, the programmer would:
- Identify a responsibility
- Determine what information is needed to fulfill it,
- Locate where that information is stored
- Identify which class contains the largest subset of the required data
- Assign responsibility to that class
- Assign the responsible class to recursively apply the Information Expert Pattern for acquiring any data still missing.