Linked Questions
27 questions linked to/from How do the Proxy, Decorator, Adapter, and Bridge Patterns differ?
12
votes
2answers
11k views
Design Patterns - Adapter pattern vs Decorator Pattern? [duplicate]
I have been reading about design patterns and this got me curious:
Decorator Pattern says wrap an original object and add additional features in the wrapper object. So structurally speaking - ...
150
votes
11answers
80k views
When do you use the Bridge Pattern? How is it different from Adapter pattern?
Has anyone ever used the Bridge Pattern in a real world application? If so, how did you use it? Is it me, or is it just the Adaptor Pattern with a little dependency injection thrown into the mix? ...
216
votes
17answers
212k views
108
votes
7answers
31k views
Differences between Proxy and Decorator Pattern
Can you give any good explanation what is the difference between Proxy and Decorator?
The main difference I see is that when we assume that Proxy uses composition and Decorator uses aggregation then ...
113
votes
6answers
49k views
Difference between Bridge pattern and Adapter pattern
What is the difference between the Bridge and Adapter patterns?
58
votes
8answers
30k views
When to Use the Decorator Pattern?
I am going over my design patterns, and one pattern I have yet to seriously use in my coding is the Decorator Pattern.
I understand the pattern, but what I would love to know are some good concrete ...
50
votes
3answers
17k views
What are the differences between proxy, wrapper or a façade classes
What are the differences between proxy, wrapper or a façade classes
They all seem to be the same to me, they take an implementation, encapsulate it and then methods are called on the wrapper/proxy/...
10
votes
3answers
8k views
What is the exact difference between Adapter and Proxy patterns?
As I understood both Adapter and Proxy patterns make two distinct/different classes/objects compatible with each for communication. And both of them are Structural patterns. I am getting that both of ...
9
votes
2answers
4k views
What are the differences between Decorator, Wrapper and Adapter patterns?
I feel like I've been using these pattern families quite many times, however, for me it's hard to see the differences as their definitions are quite similar. Basicaly it seems like all of them is ...
2
votes
5answers
2k views
Wrapping C# classes to use with polymorphism through a common interface
I've got several C# classes each with similar properties.
(They're part of an SDK and their code can’t be changed.)
Person.Name
Product.Name
Order.Name
I want to use these classes polymorphically, ...
6
votes
3answers
2k views
What pattern is used in Collections.synchronizedList()
I was reading the implementation of method Collections.synchronizedList() and was confused whether its an example of decorator pattern or a proxy pattern?
3
votes
4answers
4k views
Is a proxy class the same as a class wrapper?
I have to access a legacy database that has "generic" tables in it and I do not have the authority to change it. Depending on the customer data that I'm working with, the relationships between the ...
2
votes
3answers
2k views
adapter pattern and dependency
I have little doubt about adapter class. I know what's the goal of adapter class. And when should be used. My doubt is about class construction. I've checked some tutorials and all of them say that I ...
6
votes
2answers
1k views
Is there a name for this design pattern (dynamically wrapping around another class)?
Suppose I have a class uicontrolWrapper, which is a wrapper for a uicontrol (but does not subclass it). The uicontrol stuff is kept in a private property for uicontrolWrapper. Basically, I want to be ...
3
votes
3answers
809 views
In C#, should I use struct to wrap an object in order to fulfill additional interfaces?
There is an existing class from a third-party library I want to reuse, but it does not implement some of the required interfaces. I'm thinking of wrapping it inside a struct to fulfill the required ...