Clearly architecture has patterns everywhere.
This is where Alexander first saw them and began to catalog them.
Virtually every municipality has patterns that must be followed
for a wiring or a plumbing, a house, factory or office building.
District patterns are found in the building codes.
Imagine for a moment that there were no electrical codes.
Every electrician was free to design his own wiring solution for every job.
Not only would this be potentially dangerous.
Imagine my house is wired, AC and yours is wired DC.
Now I want to borrow your power drill.
What could possibly go wrong?
But then think about the maintenance.
Any change or repair done by someone new would take far longer and cost more
as the new electrician
would need to understand what the design was in order to work safely.
We see patterns and plenty of legislation in automobile design.
And what about mobile phones?
What patterns can you think of that we find there?
This all leads us to answer the question why?
Why do we need design patterns?
We need design patterns to ensure
that our work is consistent, reliable, and understandable.
We don't want to reinvent the wheel each time we develop a new program,
we want to use a pattern
that is consistent with work that has gone before and work yet to come.
Using design patterns helps us build reliable solutions.
Since we are not solving a problem from scratch, but applying a solution
to a problem we've seen hundreds or even thousands of times before.
By using design patterns, our work will be recognizable
and understandable by those who come after us to change or fix our programs.
Always keep in mind that most programs will be maintained and changed
long after they are initially developed.
Make it easy on your successors.
Software Design Patterns.
almost everything for this book subtitled The Elements of Reusable Object
Oriented Design, first published in 1995 by the now famous Gang of Four,
that is Gamma Helm, Johnson and Felicitas.
This was the first comprehensive work on software design patterns.
Though many more books have been written on the subject.
The Gang of Four volume is still considered the reference.
It belongs on your bookshelf.
In fact, this course would look very different
without this work if the course existed at all.