Design patterns · interview question
How would you explain a key difference between the Proxy and Adapter patterns in an interview?
Multiple choiceMediumchapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Answer and explanation
Correct answer
A. Proxy controls access while Adapter changes the interface
Why
The Proxy pattern is primarily used to control access and manage resources, while the Adapter pattern is used to transform one interface into another for compatibility.
Test yourself on Design patterns
A free test with instant, explained results. No account needed.
More Design patterns questions
- How can the Strategy Pattern help in reducing the complexity of a checkout system?
- If an e-commerce platform needs to switch between different inventory management algorithms depending on the region,…
- How would you implement a Proxy pattern to control access to a remote service that calculates tax rates in an…
- Which pattern should you use to provide a consistent API for multiple e-commerce payment providers?
- Which of the following is a key characteristic of the Proxy pattern in Java?
- What should a payment adapter own when integrating a vendor SDK?