Take the 2-minute tour ×

I have a software that communicates with api of a website. How could I increase its functionality to connect to various other api's without touching the code in it? I think the easiest way is to write a proxy that resides between api and softwre translates incoming messages from other api to the base api that this software "understands". Where should I look for more information on implementing this proxy using c#? Thank you for help.

share|improve this question
add comment

1 Answer

Hmm sounds like one of the Software design patterns you come across every day. I think what fits best with your "proxy" is actually bridge.

From sourcemaking


- Decouple an abstraction from its implementation so that the two can vary independently.
- Publish interface in an inheritance hierarchy, and bury implementation in its own inheritance hierarchy.
- Beyond encapsulation, to insulation


“Hardening of the software arteries” has occurred by using subclassing of an abstract base class

The example in C# is http://sourcemaking.com/design_patterns/bridge/c%2523

However if you just want the proxy design pattern (which imho doesn't suit your problem) is listed here:

  1. Proxy Pattern.
  2. Proxy Pattern in C#.

EDIT: Ok, for a more generalised solution, go with Proxy pattern and look at existing implementations for proxies. You'll find quite a few answers to that answer question on this site:

share|improve this answer
Hi, thanks for reply. I thought more of a real proxy server running on local machine to receive a communication from software (which I did not mention much about but is old and complicated, what makes it extremely time consuming to update) and translate these messages to other api and connect with the other api. I found this: codeproject.com/KB/IP/mywebserver.aspx, and thought this could be a base for this server ... am I correct in my reasoning? –  Macin Jun 30 '11 at 22:09
add comment

Your Answer


