Introduction to Design Patterns – the Bible to become a ROCKSTAR Java programmer


cartoon confused.jpg newDeveloping a software is not a BIG deal but developing a good software could be the one!!!

As a Java programmer you might feel knowledge of all OO programming concepts like what’s a class, what an object, what’s an inheritance, composition etc. is all what you need to write great code; but, the matter of fact is – if you think in the same manner you may not be correct one hundred percent.

OO programming concepts are not something new and have been around for decades… even after knowing all concepts so well – developers have failed terribly many times utilizing all those concepts effectively while developing softwares and this has costed them huge in terms of money and time. In 1994, a group of four people decided to jot down some of the very interesting problems which they experienced while developing softwares using OO programming concepts and which they thought were and are really very common problems among developers.

The book was called – Design Patterns – Elements of Reusable OO Software and this group of four people was called GOF – Gang of Four.

If you are working on Java or any other Object Oriented programming language – you may ignore the experiences shared by GOF in their book with OO concepts; but, then ARE YOU NOT TRYING TO REINVENT THE WHEEL...???

My question is  very straight forward – Why not go through the problems which are already discussed by GOF in their book at first place in just a couple of minutes and learn from their experiences so that you would never repeat all those same mistakes in your day to day software development work…

GOF shared their experiences with OO concepts with the help of 23 common problems which developers face on day to day basis while developing softwares. All these 23 problems are also known as 23 fundamental design patterns because every problem they discussed would teach you how you should address some very specific design issue in a software using OO concepts in a given situation and every problem got a very decent name to it depending on the type of design issue or problem it addresses. Here is the complete list of 23 common problems (also called as a list of 23 fundamental design patterns) –

Strategy Design Pattern, Observer Design Pattern, Singleton Design Pattern, Command Design Pattern, State Design Pattern, Proxy Design Pattern, FlyWeight Design Pattern, Builder Design Pattern, Prototype Design Pattern, Template Design Pattern, Factory Design Pattern, Abstract Factory Design Pattern, Adapter Design Pattern, Bridge Design Pattern, Composite Design Pattern, Facade Design Pattern, Chain of Responsibility Design Pattern, Mediator Design Pattern, Visitor Design Pattern, Interpreter Design Pattern, Iterator Design Pattern, Memento Design Pattern

GOF divided the whole set of 23 design Patterns into three categories

  • Creational Design Patterns
  • Behavioral Design Patterns and 
  • Structural Design Patterns.

At this time, before explaining each design Pattern individually if I provide the description of these three categories and tell you which design pattern comes under which category; probably that would be little unfair on my part.

Will catch you up in the upcoming posts with a detailed description of each Design Pattern individually in this series…

Happy Learning!!!