The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
123 views

What is the point behind building an abstraction layer PDO Adapter class instead of using native PDO?

I have built a PDO adapter class because I thought, at the time anyway, it would be a good idea. After fighting with it, it makes no sense to me. Isn't the design of PDO the way it is to keep you ...
1
vote
1answer
356 views

Interfaces, Adapters, exposing business objects via WCF design

I know there have been countless discussions about this but I think this question is slightly different and may perhaps prompt a heated discussion (lets keep it friendly). The scene: I am developing ...
1
vote
1answer
209 views

How to unit test a class which is just an adapter that logs input and output to a third-party library?

I have the following (in C#, but the question could also apply to Java): public interface ILibraryAdapter { string Property1 { get; } string Method1(string param1); ... } public class ...
19
votes
4answers
3k views

How should I add functionality to an object that already exists?

I have an interface that has a certain amount of well-defined functionality. Let's say: interface BakeryInterface { public function createCookies(); public function createIceCream(); } This ...
5
votes
3answers
217 views

Is there an efficient way to adapt data from a structure to another in c++?

I'm writing an interface between two configuration models that use different structures. While I know that there is no "magic" way to do the translation from a structure type to another, I wandered if ...
2
votes
2answers
72 views

Should one define an interface and code an adapter for it whenever a dependency is found?

Given a particular third-party class/library you want to make use of, the simplest thing to do would be to just hardcode API calls to it through your application. On the other hand you have the ...