Design Patterns are proven solutions provided to commonly occurred problems while designing software solution. They evolved over years to resolve most common problems, so we can follow them blindly without any hesitation.
Are Design Patterns dependent on any programming language? No, Design Pattern is an approach, it is not tied to any programming language. Once understood can be applied in any programming language.
Little History from wiki-
Patterns originated as an architectural concept by Christopher Alexander (1977/79). In 1987, Kent Beck and Ward Cunningham began experimenting with the idea of applying patterns to programming – specifically pattern languages – and presented their results at the OOPSLA conference that year. In the following years, Beck, Cunningham and others followed up on this work.
Design patterns gained popularity in computer science after the book Design Patterns: Elements of Reusable Object-Oriented Software was published in 1994 by the so-called “Gang of Four” (Gamma et al.), which is frequently abbreviated as “GoF”.
GoF Design Patterns are foundation for all the design patterns out there. They are 23 in number divided into three categories.
- Creational Patterns – Different ways of creating objects.
- Abstract Factory
- Structural Patterns – Different ways of orgainising classes and objects, using associations and aggregations to form complex structures.
- Behavioural Patterns – Interaction/Communication b/w objects, they help to keep communication loosely coupled.
- Chain of responsibility
- Template method
We will discuss each one of these patterns in details in the subsequent posts.