Software usually consists of a mixture of in-house and purchased software that must work together to produce a seamless user interface. But disparate software packages are not aware of each other's object models, so they can't work together—without adapters. Adapters let objects from unrelated software packages collaborate by adapting one interface to another. Learn how the Adapter design pattern can save you a lot of time and effort by combining disparate software systems.
David Geary, September 2003
Follow the Chain of Responsibility
The Chain of Responsibility (CoR) pattern decouples the sender and receiver of a request by interposing a chain of objects between them. In this installment of Java Design Patterns, David Geary discusses the CoR pattern and two implementations of that pattern in the Java APIs—one from client-side Java and the other from server-side Java.
David Geary, August 2003
Make your apps fly
Allocating numerous objects can be detrimental to your application's performance. In this installment of Java Design Patterns, David Geary shows you how to implement the Flyweight design pattern to greatly reduce the number of objects your application creates, which decreases your application's memory footprint and increases performance.
David Geary, July 2003
Façade clears complexity
The Façade design pattern simplifies complex APIs by providing a simplified interface to a complex subsystem. In this installment of Java Design Patterns, David Geary explores a built-in Swing façade for creating dialog boxes and a custom façade for getting a Swing application off the ground.
David Geary, May 2003
The Singleton pattern is deceptively simple, even and especially for Java developers. In this classic JavaWorld article, David Geary demonstrates how Java developers implement singletons, with code examples for multithreading, classloaders, and serialization. He concludes with a look at implementing singleton registries in order to specify singletons at runtime.
David Geary, April 2003
An inside view of Observer
The Observer pattern lets you build extensible software with pluggable objects by allowing communication between loosely coupled objects. In his latest Java Design Patterns column, David Geary explores the Observer pattern, how it's used throughout the Java 2 SDK, and how you can implement the pattern in your own code.
David Geary, March 2003
A look at the Composite design pattern
The Composite design pattern lets you treat primitive and composite objects exactly the same. In his latest Java Design Patterns column, David Geary explores how to implement the Composite pattern and how to use it with the Tiles tag library from the Apache Struts application framework.
David Geary, September 2002
Take command of your software
The Command pattern lets an application framework make requests of application-specific objects, without the framework knowing the objects' exact type or the application-specific behavior they implement. In his latest Java Design Patterns column, David Geary explores how to use the Command pattern both in client-side Java to attach application-specific behavior to Swing menu items and in server-side Java to implement application-specific behavior with the Apache Struts application framework.
David Geary, June 2002
Strategy for success
The Strategy design pattern embodies two fundamental tenets of object-oriented (OO) design: encapsulate the concept that varies and program to an interface, not an implementation. In this article, David Geary shows how to use the Strategy pattern to implement an extensible design.
David Geary, April 2002
Take control with the Proxy design pattern
The Proxy design pattern lets you substitute a proxy for an object. In that capacity, proxies prove useful in many situations, ranging from Web services to Swing icons. In this latest Java Design Patterns installment, David Geary explores the Proxy pattern.
David Geary, February 2002
Amaze your developer friends with design patterns
Design patterns are proven techniques for implementing robust, malleable, reusable, and extensible object-oriented software. To launch his Java Design Patterns column, David Geary introduces design patterns to Java developers and explores Strategy, Composite, and Decorator -- three common, yet powerful, design patterns employed throughout the JDK.
David Geary, October 2001