Skip to content
Commitwise
Menu

Design pattern

Also called: Pattern

A named, reusable solution to a problem that keeps coming up in software design.

Definition

A design pattern is not code you copy but a proven shape for solving a recurring problem, such as creating objects flexibly (Factory, Builder), adapting interfaces (Adapter) or reacting to changes (Observer). The names give teams a shared vocabulary: "make it a Strategy" says a lot in three words.

In practice

Payment methods (card, PayPal, Apple Pay) implement one PaymentStrategy interface, so checkout code doesn't need an if for each one.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.