With patterns, we have distilled years of experience and knowledge from other developers into a few concepts (OK, maybe not so few) that can be easily communicated with others.

Caveats

One should bear in mind that overuse of design patterns can lead to overengineered code.

As good software developers, we should acquire these patterns in our toolbox and have the ability to recognise when it’s appropriate to employ a particular pattern or not.

Here are some potential downsides of needlessly introducing design patterns in our models:

higher complexity – our design’s complexity will increase as we use additional classes and objects.

inefficiency – this is due to additional layers in our design.

new bugs

maintenance issues

I know it sounds obvious, but use patterns only if they are needed.

Reference Materials

The original book that documented design patterns was Design patterns: elements of reusable object-oriented software also known as the Gang of Four book, written by the Gang of Four (GoF) authors. They identified 23 object-oriented programming design patterns and split them into three categories: structural, creational and behavioural.