Some Background on Design
The term “design patterns” sounds a bit formal to the uninitiated and can be
somewhat off-putting when you first encounter it. But, in fact, design patterns
are just convenient ways of reusing object-oriented code between projects and
between programmers. The idea behind design patterns is simple-- write
down and catalog common interactions between objects that programmers
have frequently found useful.
The field of design patterns goes back at least to the early 1980s. At that time,
Smalltalk was the most common OO language and C++ was still in its
infancy. At that time, structured programming was a commonly-used phrased
and OO programming was not yet as widely supported. The idea of
programming frameworks was popular however, and as frameworks
developed, some of what we now called design patterns began to emerge.
One of the frequently cited frameworks was the Model-View-Controller
framework for Smalltalk [Krasner and Pope, 1988], which divided the user
interface problem into three parts. The parts were referred to as a data model
which contain the computational parts of the program, the view, which
presented the user interface, and the controller, which interacted between the
user and the view.
Each of these aspects of the problem is a separate object and each has its own
rules for managing its data. Communication between the user, the GUI and
the data should be carefully controlled and this separation of functions
accomplished that very nicely. Three objects talking to each other using this
restrained set of connections is an example of a powerful design pattern.
In other words, design patterns describe how objects communicate without
become entangled in each other’s data models and methods. Keeping this
separation has always been an objective of good OO programming, and if you
have been trying to keep objects minding their own business, you are
probably using some of the common design patterns already. Interestingly
enough, the MVC pattern has r