Separated Interface Design Pattern

software-engineering
Author

Humberto C Marchezi

Published

November 12, 2012

When developing a system in many cases it is possible to identify dependencies among different layers whose responsibilities are well defined in the system.

Some examples of layer dependencies are:

One strategy to remove dependencies between layers is to use the separated interface design pattern. This pattern consists of defining an interface from the bottom layer that is going to be used by the top layer. See diagram below to understand how it works for controller and UI layer:

The controllers in the example above only reference interface views and never know which view implementation they are actually working with.

This design pattern is recommended for a system when:

References: