Over a million developers have joined DZone.

The Basics of Design Patterns

DZone's Guide to

The Basics of Design Patterns

Free Resource

WSO2 is the only open source vendor to be named a leader in The Forrester Wave™: API Management Solutions, Q4 2018 Report. Download the report now or try out our product for free.

What is a Pattern?

A Pattern is a solution to a problem in a context.

Context : is the situation in which the pattern applies.This should be a recurring situation

Problem : refers to the goal you are trying to achieve in this context. But it also refers to any constraints that occur in the context.

Solution : is what you are after: a general design that anyone can apply which resolves the goal and the set of constraints.

This means, a Design Pattern gives you a solution to a common recurring design problem, However,The Design Patterns are not meant to be laws or rules; they are just guidelines that you can even alter to fit to your needs

The first and the most definite Fundamental Design Pattern Catalog is GOF, There are 23 fundamental patterns in it.

Before Start Learning the Design Pattern you need to Knowing the OO basics (Abstraction,Encapsulation, Inheritance, Polymorphism) will
not make you a good designer :) ,Patterns do not give you code. They give general solutions to design problemsPatterns are not invented they are discovered.

To learn patterns faster, they can be classified as,

Creational Patterns: Used to construct objects such that they can be decoupled from their implementing system.

Structural Patterns: Used to form large object structures between many disparate objects.

Behavioral Patterns: Used to manage algorithms, relationships, and responsibilities between objects.

Reference Head First Design Pattern Book

We need to use Design Patterns as a tool, which only be used when it is needed, Otherwise Heavy use of patterns will lead to complexity. Now I thing you have a clear idea about What is Design Pattern ?

Thanks, Have a great day :)

IAM is now more than a security project. It’s an enabler for an integration agile enterprise. If you’re currently evaluating an identity solution or exploring IAM, join this webinar.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}