Agile & Lean Software Development Management

deep thoughts on doing real work

Browsing Posts published in February, 2009

The Composite pattern is intended to allow you to compose tree structures to represent whole-part hierarchies so that clients can treat individual objects and compositions of objects uniformly. When I hear "composite pattern", immediately XML pops up in my mind. A composite is an element and a leaf is an attribute. <composite> <composite leaf="value"> Important [...]

The Chain of Responsibility is intended to promote loose coupling between the sender of a request and its receiver by giving more than one object an opportunity to handle the request. The receiving objects are chained and pass the request along the chain until one of the objects handles it. What I like about this [...]

The Template Design Pattern is used to set up the outline or skeleton of an algorithm, leaving the details to specific implementations later. This way, subclasses can override parts of the algorithm without changing its overall structure. The template pattern is a relatively simple pattern. You can use it when you have some similar classes [...]

The Interpreter pattern is intended to provide you with a way to define representation of the grammar of a language whith an interpreter that uses the representation to interpret sentences in the language. Some applications provide support for built-in scripting and macro languages so users can describe operations they can perform in the application. If [...]

The Abstract Factory pattern provides a way to encapsulate a group of individual factories that have a common theme. In normal usage, the client software would create a concrete implementation of the abstract factory and then use the generic interfaces to create the concrete objects that are part of the theme. The client does not [...]

The Decorator pattern is intended to give you a way to extend the behavior of an object or to dynamically compose an object’s behavior at runtime. The Decorator Pattern is used for adding additional functionality to a particular object as opposed to a class of objects. It is easy to add functionality to an entire [...]

The Command pattern is intended to encapsulate a request as an object. A Command object encapsulates an action and its parameters. It is useful for implementing transactional behavior or a simple workflow. Code examples (click to enlarge/collapse): simple example public class Client { public static void Run() { Receiver receiver = new Receiver(); Command command [...]

The Adapter pattern is intended to provide a way to use an object whose interface is different from the on expected by the client, without having to modify either. There are two ways to create an adapter: by inheritance or by object composition. In the first case, which generally is considered best practice, we derive [...]

The factory method pattern  deals with the problem of creating objects without specifying the exact class of object that will be created. The factory method design pattern handles this problem by defining a separate method for creating the objects, whose subclasses can then override to specify the derived type  that will be created. More generally, [...]