Design Patterns From Beginning - Day One

Introduction

A software developer makes various software/applications to solve or achieve the requirements of a company or an organization using different programming languages. In application development, the developers might use different languages or frameworks, like C++, C#, Java, PHP, Javascript, Python, Ruby on Rails etc.

In real-world development, a software developer needs to understand the different issues they face in development. They need to understand and solve these issues by following some rules or patterns. One such set of rules is known as design patterns.

 Design Patterns

Patterns were originated by a civil engineer Christopher Alexander in 1977. In 1987, Kent Beck and Ward Cunningham started applying Christopher Alexander’s idea to the programming.

Patterns were popularized by a book named "Design Patterns - Elements of Reusable Object-Oriented Software" written by Erich Gamma, Richard Helm, and Ralph Johnson and John Vlissides; better known as Gang Of Four (GOF).

Design patterns help developers in identifying the common problems and provide a pre-defined way to solve these problems. Design Patterns provide some of the best practices to refactor a code from bad practice to good practice.

Patterns are a way to provide a solution for a well-known error or problem in an appropriate manner. GOF is generally known as the foundation for all the other patterns. All the patterns are divided into 3 Groups,

  1. Creational
  2. Structural
  3. Behavioral
S.NoCreational PatternsStructural patternsBehavioral Patterns
1.Abstract FactoryAdapterChain of Response
2.BuilderBridgeCommand
3.Factory MethodcompositeInterpreter
4.PrototypeDecoratorIterator
5.SingletonFlyweightObserver
6.facadeVisitor  
7.ProxyTemplate Method  

Creational Patterns

Creational design patterns are all about classes and objects. These patterns are also divided into class creation patterns and object creations patterns.

Structural Patterns

Structural Patterns provide a context to define the relationship between classes. It is all about the class and object composition.

Behavioral Patterns

These design patterns are concerned with communication between objects.

Summary

I hope that you understood what design patterns are and how many types of it there are. In the next article, we will discuss the different types of Design Patterns in detail.


Similar Articles