Keyhole Design Pattern
The keyhole design pattern can be used when we wish to expose only a fraction of an object to another component.
If an object’s capabilities are deemed too powerful to pass around nilly willy, we may want to constrain the scope of what gets passed to...
philosopherping.com1 min read
Felix GV
Code Archeologist
Andris on LinkedIn commented that this might be related to other design patterns, to which I responded:
I guess the facade is the classical pattern that best matches what I’m describing. You could say the keyhole is one of the ways in which a facade can be leveraged. The facade is more general and has other potential applications besides constraining the API surface.