Design Patterns – Introduction

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.

  1. Creational Patterns – Different ways of creating objects.
    • Singleton
    • Factory
    • Abstract Factory
    • Prototype
    • Builder
  2. Structural Patterns – Different ways of orgainising classes and objects, using associations and aggregations to form complex structures.
    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Facade
    • Flyweight
    • Proxy
  3. Behavioural Patterns – Interaction/Communication b/w objects, they help to keep communication loosely coupled.
    • Chain of responsibility
    • Command
    • Interceptor
    • Iterator
    • Mediator
    • Memento
    • Observer
    • State
    • Strategy
    • Template method
    • Visitor

We will discuss each one of these patterns in details in the subsequent posts.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s