Linked Questions

36 votes
2 answers
33k views

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 - ...
Navin Israni's user avatar
  • 1,377
176 votes
13 answers
100k views

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 Adapter pattern with a little dependency injection thrown into the mix? Does ...
Charles Graham's user avatar
249 votes
17 answers
265k views

What is a wrapper class? How are such classes useful?
Bhaskar's user avatar
  • 4,243
220 votes
10 answers
71k views

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 ...
Łukasz Rzeszotarski's user avatar
179 votes
10 answers
84k views

What is the difference between the Bridge and Adapter patterns?
Firoz's user avatar
  • 7,492
88 votes
8 answers
51k views

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 ...
Alex Baranosky's user avatar
83 votes
3 answers
30k views

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/...
Jon's user avatar
  • 40.2k
34 votes
2 answers
25k views

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 ...
Zoltán Tamási's user avatar
36 votes
3 answers
28k views

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 ...
Supun Wijerathne's user avatar
8 votes
3 answers
3k views

I was reading the implementation of method Collections.synchronizedList() and was confused whether its an example of decorator pattern or a proxy pattern?
Chander Shivdasani's user avatar
3 votes
5 answers
2k views

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, but ...
Chris Fulstow's user avatar
4 votes
4 answers
4k views

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 ...
user avatar
2 votes
4 answers
3k views

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 ...
Ivan's user avatar
  • 2,262
5 votes
3 answers
3k views

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 ...
shengmin's user avatar
  • 329
6 votes
2 answers
2k views

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 ...
Dang Khoa's user avatar
  • 5,831

15 30 50 per page