User Tools

Site Tools


design_pattern

Design patterns

design pattern - an abstract unit of commonly recurring design (e.g., Singleton, Adapter, Iterator, Visitor) that comprises a fairly small number of entities having distinct roles and identified interrelationships, is more general than can be expressed directly (e.g., as a template) in reusable code, and is often language agnostic (e.g., C++, D, Java, Python, Smalltalk). Note that CRTP, despite having a P (for pattern), is so formulaic and nonportable that it might be considered a C++ idiom instead. See gamma95: Chapter 3, sectionSingleton,” pp. 127–138; Chapter 4, sectionAdapter,” pp. 139–150; and Chapter 5, sectionIterator,” pp. 257–271, and sectionVisitor,” pp. 331–349. Opaque enums (669)” (EMCppSfe 2021)

It is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

Design patterns are formalized practices a programmer can use to solve common problems when designing an application or system.

design_pattern.txt · Last modified: 2022/03/21 03:25 by 127.0.0.1