1

Let's say we have a back-end that needs to talk to N external systems using some kind of Web Services.

What I do is: Create a separate project and generate there the proxy classes (using the service's WSDL in the WCF Service Reference dialog).

About the project name suffix:

I firstly though XxAdapter. But then, I started creating classes with additional logic like CircuitBreakers so I ended up with XxAgent (from ServiceAgent).

What should be the "correct" suffix for the name of such projects.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
Nikos Baxevanis
  • 10,868
  • 2
  • 46
  • 80
  • 3
    There's no "correct" or right answer - you need to define that for yourself. The client-side code is often called "proxy" - so that might be one option. Or just something like "client". Take your pick, stick with it - there's no right or wrong or no "Microsoft recommended standard way" of naming those... – marc_s Mar 05 '11 at 20:44
  • I agree with you. I go with XxAgent. – Nikos Baxevanis Mar 09 '11 at 21:19
  • xxAgent is fine, or maybe xxClient – Robert Mar 14 '11 at 10:40

1 Answers1

1

The most appropriate suffix is "Proxies" because of several reasons:

  1. Your component contains all the web service proxy classes.
  2. In case that you want to make calls to several service proxies transparent, you can create a new class named MyLocalProxy, and perform the action

    public class MyServiceProxy { public void DoSomething() { var serviceProxy1 = new ServiceProxy1(); serviceProxy1.DoOneThing();

            var serviceProxy2 = new ServiceProxy2();
    
            serviceProxy2.DoAnotherThing();
        }
    }
    

The additional class helps you to not depend on concrete service proxies, so you can interchange them as you wish.

Cheers.

Toan Nguyen
  • 11,263
  • 5
  • 43
  • 59