Button, Button, Who's Got the Button?


By: R.C. Martin

Pattern: Approaches for Separating Clients from Servers


Published in: ROAD, Nov.-Dec. 1995
Pages: 26-29

Two approaches for separating clients from servers in a simple application based on a table lamp.

Category: Client-Server

Summary: Two approaches for separating clients from servers in a simple application based on a table lamp.

Pattern: Intelligent Children

Manage dependencies between clients and servers by defining an abstract class whose implementers interact with specific servers.

Pattern: Abstract Server

Break dependencies between clients and servers by defining an abstract class referenced by the client with the server implementing the abstract class.

Pattern: Adapted Server

Break dependencies between clients and servers by defining an abstract server class referenced by the client. A server is derived from the abstract server class that contains the actual server.