Hi,
A slightly tongue-in-cheek look at Design patterns.
Design Pattersn are the result of some people noticing that certain -
guess what ;-) - patterns keep appearing in their code. They decided to
classify and catalogue - and thus Design Patterns became formalised and a
new discipline was born.
<Every single programmer> uses patterns - coding habits/techniques. Read
enough about Design Patterns and you'll find that a name has been given to
something you've already been doing, perhaps for years. (How many unrealised
Singleton Patterns must there be out there).
Often, giving a name to a pattern (and hence making it a <Design Pattern>)
will enable thinking to become clarified. It certainly enhances communication
between those who are 'in the know' - as does all jargon - though the downside
is that, of course, outsiders get excluded.
Another advantage is that a pattern, once formally designated, is open to
scrutiny, experimentation, enhancement, etc and there is somewhere to 'hang
the results' so that other people can benefit.
Many patterns are obvious once you have seen the code behind the name -
"yeah, ok, so they have a name for it". Others are a revelation "Hey! I can
use this!!". Others are in between - giving a new angle on something, a hint
or tip, an improvement. "Hmm, that looks a bit better than mine".
Some Design Patterns have not been catalogued, but are nevertheless widely
implemented. These tend to have a wide number of variations making
classification difficult, but would come under such headings as Plate of
Spaghetti, Can of Worms, Monolithic Block, Repetitious Garbage and the like.
In these days of OOP there are large numbers of classes following the
Grumpy Tiger Pattern - nobody dares look at it, let alone go near it!
Regards,
Fergus