Introduction

This article will cover the following things:

Brief Concepts

What are design patterns?

“Provide solutions for iterative OOPS problems”.

Design patterns are divided in to three categories

Class creation problem

Structural design pattern

Instantiation problems

Creational design pattern.

Runtime problems

Behavioral design pattern.


Implementation - Creational Patterns (Using the code)

Factory Design Pattern

It is being divided into two sections – Problem and Solution

Steps for creating the Problem

Prototype Design Pattern

It is being divided into the two sections – Problem and Solution.

Steps for creating the Problem

Steps for resolving the problem using Prototype Pattern (Solution)

Singleton Design Pattern

It is being divided into the two sections – Problem and Solution

Steps for creating the Problem

Steps for resolving the problem using Singleton Pattern (Solution)

Implementation - Structural Patterns (Using the code)

Adapter Design Pattern

It is being divided into two sections – Problem and Solution

Steps for creating the Problem

Adapter1 Class

Adapter2 Class



Steps for resolving the problem using Adaptor Pattern (Solution)

Facade Design Pattern

It is being divided into two sections – Problem and Solution.

Steps for creating the Problem

Steps for resolving the problem using Facade Pattern (Solution)

Implementation - Behavioral Patterns (Using the code)

Observer Design Pattern

It is being divided into two sections – Problem and Solution

Steps for creating the Problem

Steps for resolving the problem using Observer Pattern (Solution)

Points of Interest

After reading and understanding all the design patterns, I came to the conclusion, tha a few of the patterns, listed in the article, mentioned above, must be known to every DEV or ARCHITECT.