Decorator Pattern
Version 1.0.0 · Updated 2026-07-30
CORE DEFINITION
Dynamically add extra responsibilities or functions to an object without changing its original structure. It's like adding a filter to a photo; the photo itself remains unchanged.
SCAFFOLDING EFFECT
Reduce cognitive load
Painless upgrade. Don't try to change a person's essence (core code). Instead, endow them with new abilities through 'decoration'. For example, equip an introverted employee (core) with a detailed communication SOP (decorator) so they can handle external communication without being forced to become extroverted.
Anchor fast decisions
Decorator is a GoF structural pattern that dynamically adds responsibilities to an object without changing its class, offering more flexibility than inheritance.
MINIMUM ACTION
In progress 0/3Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Decorator_patternverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS