Skip to content
Sharp

Design patterns · interview question

In an e-commerce application, you want to delay loading product images until they are actually needed. Which design pattern is most suitable for this scenario?

Multiple choiceEasychapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Choose one answer
Answer and explanation

Correct answer

A. Proxy

Why

The Proxy pattern is used to control access to an object, in this case, delaying the loading of product images until they are needed. It acts as a surrogate and defers the creation of resource-intensive objects.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →