Where Are We?

The dominant concept in component software is the interface, hence the term interface-based programming. Interfaces are abstract types that define a contract between two agents: the implementation (often referred to as the component) and the consumer (often referred to as the client). As shown in Figure 6.1, the implementation exposes its functionality via one or more interfaces. The consumer utilizes this functionality via the interfaces exposed by the implementation. In the purest application of the interface-based programming model, the consumer knows nothing about the implementation other than the interfaces it supports.

Figure 6.1. Components and interfaces

The interface-based programming model enforces encapsulation. Implementors ...

Get Essential XML: Beyond Markup now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.