design-patternsgrasp

GRASP Indirection vs Mediator Pattern


What is the difference between GRASP Indirection and Mediator Pattern? I've tried googling but did not find the information.


Solution

  • GRASP Indirection seeks to avoid direct coupling:

    Assign the responsibility to an intermediate object to mediate between other components ... so that they are not directly coupled.

    So, you could argue that GRASP Indirection is a big inspiration for the Mediator pattern. But, you also can find it in other patterns, such as Adapter.