Skip to content
Search

Design pattern

lastmod 2025-04-25created 2015-03-1732 edits

A design pattern is a term used in architecture and computer science for a formal method devised to solve design problems in a particular domain. The approach originated with what the architect Christopher Alexander devised in the field of architecture, and it was later adopted in several other fields, including computer science. A structured collection of patterns that can be used in relation to one another across various concrete domains is called a pattern language.

Design Patterns (Design Patterns, ISBN 0201633612) is a book that proposed standard solutions and naming for common problems in software design. It was co-written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, known as the Gang of Four (Gang of Four, GoF for short) of this field, and the Korean edition was translated by Kim Jeong-a and published by Pearson Education Korea. The first half of the book is devoted to defining various design patterns, and the other half lists design patterns that are useful in practice. The book's examples are given in C++ and Smalltalk, which are object-oriented languages.

A structured collection of related patterns in each domain is called a pattern language.

Design patterns in computer science

A design pattern used in software development methods is one way to solve tasks that often come up in program development. It gathers design know-how found in past software development, gives it a name, and organizes it into a set of specific conventions in a form that is easy to reuse later. Unlike an algorithm, it is not in a form that can be turned directly into program code, but it describes a way to solve a structural problem in a particular situation.

The term was first concretely presented in the field of software development in 'Design Patterns: Elements of Reusable Object-Oriented Software' (in Korean, 'Elements of Reusable Object-Oriented Software - Design Patterns'), a book written by four computer science researchers called the GoF (Gang of Four). The GoF refers to four researchers in the field of computer software engineering: Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.

More detailed information on software design patterns is organized on theSoftware design patternpage.

Design patterns and pattern conferences

GoF's design patterns and their members, together with scholars, engineers, and publishers interested in patterns, came together to start a conference called PLoP.

Criticism of patterns

Many people have criticized design patterns. Let's look at the common reasons they give for not using patterns.

They work as kludges for weak programming languages

The need for patterns usually arises when developers choose a programming language or technology that lacks the level of abstraction. In this case, patterns work as a kludge (a messy, makeshift, but effective solution to a problem) that gives a weak programming language the superpowers it needs.

For example, the Strategy pattern can be implemented with a simple anonymous (lambda) function in most modern programming languages.

Inefficient solutions

Patterns try to systematize problem-solving approaches that are already widely used. Many people follow these unified patterns like dogma and implement them 'to the letter' instead of applying them according to the project's context.

Unjustified use

망치만 있으면 모든 것이 못처럼 보입니다.

Many beginners, having just learned patterns, try to apply them everywhere, even in situations where simpler code would solve the problem. This is a problem that plagues many beginners who have recently become familiar with patterns.

See also

Favorite site

author Zer0 sitemap