design-patternsdecoratorbridgeproxy-pattern

How do the Proxy, Decorator, Adapter, and Bridge Patterns differ?


I was looking at the Proxy Pattern, and to me it seems an awful lot like the Decorator, Adapter, and Bridge patterns. Am I misunderstanding something? What's the difference? Why would I use the Proxy pattern versus the others? How have you used them in the past in real world projects?


Solution

  • Proxy, Decorator, Adapter, and Bridge are all variations on "wrapping" a class. But their uses are different.