DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The Basics of Design Patterns

Prathap Givantha Kalansuriya user avatar by
Prathap Givantha Kalansuriya
·
Sep. 18, 12 · Interview
Like (0)
Save
Tweet
Share
7.84K Views

Join the DZone community and get the full member experience.

Join 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 :)

Design

Published at DZone with permission of Prathap Givantha Kalansuriya. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Connecting Your Devs' Work to the Business
  • Silver Bullet or False Panacea? 3 Questions for Data Contracts
  • Apache Kafka Introduction, Installation, and Implementation Using .NET Core 6
  • Uplevel Your Managers With Mini-M Support Groups

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: