Design Patterns

The Art of Designing Object-Oriented Software

Design patterns are an Elegant Solution to repeating problems in software design.

Pre-requisites:

  • A few months of programming experience.
  • Familiarity with Object-Oriented principles.

Focus:

  • Building reusable and extensible object-oriented software
  • The Art of Designing Object-Oriented Software

Book:

Design Patterns — Elements of Reusable Object-Oriented Software by Gangs of Four(GoF)

  • Creational patterns: Different ways to construct an object are the focus of creational patterns.
  • Structural patterns: The relationship between these objects is the subject of structural patterns.
  • Behavioural patterns: The interaction/communication of these objects is the subject of behavioural patterns.

Learning Design Patterns gives us the capability to Think in Objects!

Creational design patterns

These design patterns are all about class instantiation. This pattern can be further subdivided into patterns for creating classes and patterns for creating objects. Although class-creation patterns make good use of inheritance in the instantiation process, object-creation patterns make good use of delegation.

  • Abstract Factory
  • Builder
  • Factory Method
  • Object Pool
  • Prototype
  • Singleton

Structural design patterns

These design trends are all about combining classes and objects. Inheritance is used in structural class-creation patterns to compose interfaces. Structural object patterns describe how to put objects together to create new features.

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Private Class Data
  • Proxy

Behavioural design patterns

The contact of Class’s artefacts is the focus of these design patterns. Behavioural trends are those that are most associated with object communication.

  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Null Object
  • Observer
  • State
  • Strategy
  • Template method
  • Visitor

Conclusion

This article should have given you a good introduction to the Design Patterns and how important it is to have good knowledge about them. There’s still a lot to learn about them, but I hope you now feel comfortable diving in and experimenting with a wide range of powerful utilities on your own.

References:

https://sourcemaking.com/design_patterns
https://youtu.be/srQt1NAHYC0
https://youtu.be/FLmBqI3IKMA

--

--

JP Morgan Chase & Co | Google DSC LEAD | Microsoft Student Partner | Web developer | Technical Writer | TheProgrammedEnthusiast |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Srivastava

JP Morgan Chase & Co | Google DSC LEAD | Microsoft Student Partner | Web developer | Technical Writer | TheProgrammedEnthusiast |