Knowledgebase

Understanding Design Patterns Print

  • softwareengineering, software, troubleshooting, guide, howto, solution, zillionkinghost, hosting
  • 0

What they are and are not.

WHAT A PATTERN IS

A named, documented solution to a problem that recurs.

WHAT THEY PROVIDE

A vocabulary, so a structure can be named rather than described Solutions that have been examined and refined Awareness of trade-offs already identified

WHAT THEY ARE NOT

Rules Goals Evidence of good design

WHAT THE COMMON MISUSE IS

Applying patterns because they are known, rather than because a problem calls for them.

WHAT THAT PRODUCES

Complexity with no benefit, and code harder to follow than the direct version.

WHAT TO ASK BEFORE APPLYING ONE

What problem am I solving?

WHAT TO DO IF THE ANSWER IS UNCLEAR

Write the direct version.

WHAT PATTERNS ARE MOST USEFUL FOR

Recognising a structure you already need, and naming it.

WHAT THE CATEGORIES ARE

  • Creational: how objects are made
  • Structural: how objects are composed
  • Behavioural: how objects interact

WHAT TO LEARN

The problems they address, more than the implementations.

WHY

The implementation varies by language; the problem does not.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot