Facade

Facade provides a simple entry point to a complex subsystem, cutting the coupling between the client and the internals. A service layer or a library SDK is effectively a Facade. It differs from Adapter (interface conversion) and Mediator (two-way coordination).

February 25, 2024 · 3 min read

Decorator

Decorator replaces the subclass explosion of inheritance with composition. It stacks wrappers that keep the same interface to add behavior at runtime. java.io, Python function decorators, and web middleware chains are all variations on the same intent.

February 18, 2024 · 4 min read