Use the Adapter design pattern in Java to interface consistently with clients
Source: Addison Wesley Professional
Leverage the power of design patterns in Java: learn how to use the Adapter pattern to provide consistent interfaces to clients in this sample chapter from Design Patterns in Java, 2nd Edition. Discover how the Adapter pattern lets you use an existing class to meet a client class's needs. For instance, when a client specifies its requirements in an interface, you can usually create a new class that implements the interface and subclasses an existing class. This approach creates a class adapter that translates a client's calls to the existing class's methods. And, even when a client does not specify the interface it requires, you may still be able to apply Adapter, creating a new client subclass that uses an instance of the existing class. Investigate the Adapter pattern via real Java programs, clear UML diagrams, and compelling exercises. Learn how to improve new code and refactor existing code for simplicity, manageability, and performance so that when you design your own systems, you will have at your fingertips the power and flexibility that can be derived from an architecture that uses Adapter to advantage.
Title: Design Patterns in Java, 2nd Edition
ISBN: 0321333020
Published: April 2006
Authors: Steven John Metsker, William C. Wake
Chapter: Chapter 3: Adapter
Published by Addison Wesley Professional
Title: Design Patterns in Java, 2nd Edition
ISBN: 0321333020
Published: April 2006
Authors: Steven John Metsker, William C. Wake
Chapter: Chapter 3: Adapter
Published by Addison Wesley Professional
| Format: | Size: | 549.00 | |
| Version: | 1.0 | Date: | Nov 2006 |
| Price: | 0.00 | Downloads: | 1166 |



