Skip to main content

Questions tagged [adapter]

0 votes
4 answers
674 views

I got a bit strange 'future ready' scenario. And I'm not sure if I got it right in regards to C# adapter design pattern. The scenario is that to be future ready, 'to use the adapter pattern' to easily ...
Peter's user avatar
  • 137
1 vote
1 answer
122 views

I'm building a service to send push notifications to the user. At first, I designed an Interface for the push notification adapters, something like this: interface PushNotificationAdapterInterface { ...
Thiago Dias's user avatar
2 votes
1 answer
184 views

After visit dozens of pages searching a "non-sockets-or-iphone-conceptual-example" of Adapter Pattern, I have found this one: Lloyds bank is an international bank offers services worldwide. For ...
celsowm's user avatar
  • 253
0 votes
1 answer
168 views

Please let me illustrate with a simple example. Suppose we have a Weather object: class Weather: def get_forecast(self, day, place): forecast = "code that calculates forecast" ...
Andrew 's user avatar
2 votes
1 answer
610 views

A common use of the adapter pattern is to support functionality that isn't actually supported in an underlying class. For example, if I use an API to interact with a Samsung Smart TV, I might want to ...
moonman239's user avatar
  • 2,063
1 vote
1 answer
5k views

(example code in PHP, but this can apply to more languages) I have a scenario with an adapter pattern, where I have classes, interfaces and objects with different roles, like so: An original object ...
donquixote's user avatar
7 votes
1 answer
790 views

I have a situation where I have an external library. In short, I need to be able to adapt my type to theirs, and theirs to mine. The library has a collection like so: interface IExternalCollection { ...
Chris Wohlert's user avatar
2 votes
1 answer
5k views

I am very confused about Adapter and Delegation design pattern. In Adapter pattern we bring an intermediate class to interact with another class. And in Delegation pattern we also bring an ...
Muztaba Hasanat's user avatar

15 30 50 per page