Chapter 2

Service Access and Configuration Patterns

There once was a man who went to a computer trade show. Each day as he entered, the man told the guard at the door: “I am a great thief, renowned for my feats of shoplifting. Be forewarned, for this trade show shall not escape unplundered.”

This speech disturbed the guard greatly, because there were millions of dollars of computer equipment inside, so he watched the man carefully. But the man merely wandered from booth to booth, asking questions and humming quietly to himself.

When the man left, the guard took him aside and searched his clothes, but nothing was to be found. On the next day of the trade show, the man returned and chided the guard saying: “I escaped with a vast booty yesterday, but today will be even better.” So the guard watched him ever more closely, but to no avail.

On the final day of the trade show, the guard could restrain his curiosity no longer. “Sir Thief”, he said, “I am so perplexed, I cannot live in peace. Please enlighten me. What is it that you are stealing?”

The man smiled. “I am stealing patterns”, he said.

Adapted from “The TAO Of Programming” [JH98] by Geoffrey James and Duke Hillard

This chapter presents four patterns for designing effective application programming interfaces (APIs) to access and configure services and components in stand-alone and networked systems: Wrapper Facade, Component Configurator, Interceptor, and Extension Interface.

Networked systems are inherently heterogeneous [HV99]. ...

Get Pattern-Oriented Software Architecture, Volume 2, Patterns for Concurrent and Networked Objects now with O’Reilly online learning.

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