Home About Me Contact Me Articles Research Blog FAQ
DESIGN PATTERNS
Patterns are all around us and in so many things that we, as humans, use and do. The Concise Oxford Dictionary defines the word pattern as "an excellent example; perfect, ideal, model". This definition identifies a pattern as an ideal example; a model from which other things can be manufactured. Patterns can be both tangible (i.e. perceptible by touch), or intangible. Tangible patterns, such as a clothing-pattern or screen-press, are easy to identify with. But, whether we know it or not, we often make use of intangible patterns in our behaviour. When it's cold outside, we put on a coat. The act of putting on a coat is a reusable sequence of movements that return (manufacture) a predictable feeling of warmth on a chilly day. Our mental model of this act (the model we build either consciously or subconsciously in our mind regarding how we put a coat on) constitutes a pattern for achieving that warmth.
All patterns exist as a means of solving a problem. In the previous example, the problem is that of feeling cold; the solution is to put on a coat. Tangible patterns solve problems too: A clothing-pattern guides the tailor's cut such that the risk of mistake is minimised and the productivity of the tailor increased.
But, solving a problem by using a pattern is not the end of it: There are consequences. In putting on a coat, you may not be able to show-off your latest sweater as you had hoped and there may be a heightened risk that you will overheat with your coat on. Thus a pattern is a model for manufacturing something, a solution to a problem, that has consequences that will sometimes constrain its applicability in a specific, given situation.
What is an Object-Oriented Design Pattern?
A design pattern is simply a pattern for a design: It is a model from which a design can be manufactured. An Object-Oriented (OO) design pattern is a model from which a design for Object-Oriented software can be created.
As with all patterns, OO design patterns involve problems, solutions and consequences. The Gang-of-Four (GOF) in their famous book cataloguing a series of popular design patterns "Design Patterns: Elements of Reusable Object-Oriented Software" define patterns in just such terms.
A Catalogue of Design Patterns
This section documents a set of OO design patterns that Martin has found particularly useful or interesting over the last few years.
Feel free to download the example pattern implementation code. If you have any questions or comments please contact Martin.