Home > Design Patterns > Legacy Wrapper
Legacy Wrapper

Legacy Wrapper (Erl, Roy)

How can wrapper services with non-standard contracts be prevented from spreading indirect consumer-to-implementation coupling?

Problem

Wrapper services required to encapsulate legacy logic are often forced to introduce a non-standard service contract with high technology coupling requirements, resulting in a proliferation of implementation coupling throughout all service consumer programs.

Solution

The non-standard wrapper service can be replaced by or further wrapped with a standardized service contract that extracts, encapsulates, and possibly eliminates legacy technical details from the contract.

Application

A custom service contract and required service logic need to be developed to represent the proprietary legacy interface.

Impacts

The introduction of an additional service adds a layer of processing and associated performance overhead.

Legacy Wrapper: Tight coupling of the service logic to both the legacy API and the service contract alleviates service consumers from implementation coupling.

Tight coupling of the service logic to both the legacy API and the service contract alleviates service consumers from implementation coupling.