Lowest Common Denominator Interface

Pattern Name and Classification: Lowest Common Denominator (LCD) Interface (Behavioral) Intent: To provide the simplest way to create a common interface for two or more software components that are non-identical but which share some common methods.

Also Known As: LCD Interface

Motivation: When integrating existing software components into a Service-Oriented Architecture (SOA) it is necessary to create a Service Interface that captures the functionality of that software and makes it available as a Service. Similar software components should be wrapped with a common interface to enable them to be used modularly within the SOA. The LCD interface is a simple approach to rapidly defining a common interface, with a direct relation between the methods of the common interface and the functionality of the underlying legacy component.

Implementation: A LCD interface is a strict intersection of the functionality of all the legacy components considered. This can be derived by creating interfaces for individual legacy components, normalizing the methods, and extracting those that are common. The data models used in the LCD interface may be different from those wrapped in the legacy systems, although typically the most common approach will be re-used.

Structure: Figure shows a Venn diagram comparing the hypothetical interfaces of two legacy systems with the LCD interface



Applicability: It is feasible to use a LCD interface when the intersection of functionality between legacy systems includes the functionality that, in the view of an expert, captures the core essence of all the legacy systems considered.

Participants: The pattern applies to at least two software components which have service-like behavior that is similar. It can be generalised to include more components.

Collaboration: The LCD interface can be implemented as an Adaptor-style service. Calls to the LCD interface can be passed directly on to the legacy systems that have been wrapped, although data types may have to be converted and course grained methods may have to be devolved into several fine grained calls.

Consequences: The LCD interface is simple to derive, but its effectiveness at capturing the functionality of wrapped legacy systems depends on a high similarity between the functionality of those systems. It may stifle richness by ignoring novel functionality that is not shared by all. In addition, the likelihood of the LCD interface being effective (capture core functionality) is reduced in proportion to the number of legacy systems being wrapped.

Known Uses: This pattern was used within the JISC FREMA project to wrap two item banks (TOIA and E3AN). The code is available from the FREMA website (www.frema.ecs.soton.ac.uk).

Related Patterns: Adaptor Pattern [8]: described how classes can be wrapped in Object Orientation, it is a structural pattern focusing on methods of implementation, rather than what parts of the wrapped class should be exposed. Most Popular Interface and Negotiated Interface are alternative patterns that deal with defining common interfaces for similar software systems.