what is the difference between the Adapter Pattern and Proxy Patterns?its seems both are almost similar?



what is the difference between the Adapter Pattern and Proxy Patterns?its seems both are almost simi..

Answer / ravis190784

Comparing Adapter Pattern with other Patterns:

1. Adapter converts one interface to another, Decorator doesn't alter interface but adds responsibility. Facade makes an interface simpler.
Decorator is thus more transparent to the application than an adapter is. As a consequence, Decorator supports recursive composition, which isn't possible with pure Adapters.

2. Adapters allows client to make use of libraries and subsets without changing any code. Decorators allow new behaviour to be added to the classes with out altering the existing code.

3. Adapter make things work after they're designed, Bridge makes them work before they are.

4. Bridge is designed up-front to let the abstraction and the implementation vary independently. Adapter is retrofitted to make unrelated classes work together.

5. Adapter provides a different interface to its subject. Proxy provides the same interface. Decorator provides an enhanced interface.

6. Facade defines a new interface, whereas Adapter reuses an old interface. Remember that Adapter makes two existing interfaces work together as opposed to defining an entirely new one.

Is This Answer Correct ?    16 Yes 3 No

Post New Answer

More Design Patterns Interview Questions

What is onion architecture?

0 Answers  


What is difference between GoF and J2EE patterns?

1 Answers   Accenture,


When should design patterns be used?

0 Answers  


What is aop design?

0 Answers  


Can any one suggest me the best institute for Software Design , Design Patterns and architecture in Hyderabad please. Thanks in Advance.

2 Answers   IBM, KPIT,






Is mvc a software design pattern?

0 Answers  


Why is singleton bad?

0 Answers  


Can we use an equated value as operands for an MVC ? Reason for the same.

0 Answers   Ness Technologies,


what is design patterns? which design patterns mostly used in .net? How it is used with examples?

1 Answers   IBM, Satyam,


If i make my selection in State Dropdown list, i would the City and ZipCode dropdown list to be automatically reupdated based on the State i select.(This to avoid the user select a City or Zipcode that does not correspond to the State previously selected.)

1 Answers  


What is use case in clean architecture?

0 Answers  


Is singleton a design pattern?

0 Answers  


Categories