next up previous
Next: Behavioral compatibility Up: Introduction Previous: Component interoperability

Interface compatibility

Parnas's principles [16] of information hiding for modules emphasize the separation of interface from implementation: components providing different implementations of the same interface can be swapped without having a functional affect on clients; two components need to agree on the interface in order to communicate. This works well in object-oriented programming where the design is centralized, but is not practical in component-based designs [14]. Agreement beforehand is possible only if third-party component providers were coordinated.

Extending Parnas's principles to component-based programming (CBP), the component clients (i.e., other components) must be provided with composition information and nothing more. Even agreement on the interface is no longer an accepted level of exported information. Components gathered from third parties are unlikely and cannot be expected to agree on interfaces beforehand. For third-party composition to work, components need to agree on how to agree rather then agree on the interface.

Indeed, CBP builder environments typically apply two mechanisms to overcome this difficulty and support third-party composition [13]. First, to check for interface compatibility, builders use introspection. Introspection is a means for discovering the component interface. Second, builders support adaptability by generating adapters to overcome differences in the interface. Adapters are a means of fixing small mismatches when the interfaces are not syntactically identical.


next up previous
Next: Behavioral compatibility Up: Introduction Previous: Component interoperability
David H. Lorenz 2003-06-30