ArjanCodes
15 minutes
The registry pattern is a software design pattern that replaces hard-coded conditional dispatch (if/else chains) with a central lookup structure that maps keys (strings or enumerations) to behaviors, which are retrieved and invoked dynamically. Because new behaviors are added by registering them rather than editing core logic, it applies the open-closed principle and supports plug-in architectures, and registration can be made automatic through decorators or module discovery. It belongs to software design and extensibility, closely related to dispatch tables and plug-in systems.