Sunday, July 21, 2019

INTRODUCTION

There are around 250+ design patterns. More often than not these patterns overlap in many concepts and differ only by very little.

 I will not be using any UML diagrams but I would be giving full code examples and try to explain things in as easy a manner as I possibly could.


I will be covering up the most famous and basic design patterns (23 in number) which are divided into three groups:
  1. Creational Design Patterns
  2. Structural Design Patterns
  3. Behavioral Design Patterns
 Let me try to explain briefly what these three patterns generally cover:

 Creational Design Patterns: As the name suggests, these patterns concern with how an object or instance of a class is created. They include the following patterns:
  • Builder
  • Abstract Factory
  • Factory Method
  • Singleton
  • Prototype
Structural Design Patterns: These patterns are concerned with how to put objects/instances, classes together into a larger structure and still have a maintainable, efficient and flexible code. They include the following patterns:
  • Adapter
  • Composite
  • Facade
  • Decorator
  • Bridge
  • Proxy
  • Flyweight
  Behavioral Design Patterns: These are concerned with how the objects interact with each other, what algorithm to use and what responsibilities should be given to which object and how should it behave. They include the following patterns:
  • Strategy
  • Mediator
  • Interpreter
  • Chain of Responsibility
  • Command
  •  Iterator
  • State
  • Template Method
  • Memento
  • Visitor


Next, I would be covering these groups of design patterns one by one, starting with the Creational Design Patterns.
I will also provide complete Java code (on GitHub) so that you can try it on your own machines.



Stay sober.
Keep coding.
xoxo