Design Patterns · Middle · Question 3 of 75

How does Decorator differ from Proxy if their structure is similar?

Explanation

Both wrap an object with the same interface. Decorators are usually stacked to build up functionality (logging + cache + retry). A proxy manages lifecycle and access: lazy loading, permission checks, a remote object. Many patterns differ precisely by their goal.

Further reading

Problem with a question

Design Patterns · Middle · question 3

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz