🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Programming Concepts Intermediate

What is Design Pattern?

A reusable solution template for commonly occurring problems in software design.

Design patterns are proven solutions to recurring design problems. The Gang of Four book categorizes them into creational (Singleton, Factory, Builder), structural (Adapter, Decorator, Proxy), and behavioral (Observer, Strategy, Command) patterns.

Patterns provide a common vocabulary for developers and help create flexible, maintainable code. However, overusing patterns adds unnecessary complexity. Apply patterns when they solve a clear problem, not preventively.

Related Terms

Composition over Inheritance
A design principle favoring object composition (has-a relationships) over class inheritance (is-a relationships) for code reuse.
Race Condition
A bug that occurs when the behavior of software depends on the timing or order of uncontrolled events like thread scheduling.
Queue
A data structure that follows First-In-First-Out (FIFO) ordering, where elements are added at the rear and removed from the front.
Regex (Regular Expression)
A sequence of characters that defines a search pattern, used for string matching, validation, and text manipulation.
Singleton Pattern
A design pattern that restricts a class to a single instance and provides a global point of access to that instance.
Code Smell
A surface indication in code that usually corresponds to a deeper problem in the system, suggesting the need for refactoring.
View All Programming Concepts Terms →