I'm building a WCF service project. It has a few layers, like Data, Business or Hosts. I usually also added "Clients" folder and "Proxy" project inside. So that anyone (who wants to use my service) can reach out to the repository, grab Proxy project and adds it to his own project.

Does it make any sense? Is Proxy class really a part of the Service? or should it be build on the client side?

My second idea, was to create a "Samples" folder, and put Proxy project there.

1 Answer 1


A Proxy is a client-side representation of a service, so it belongs conceptually to the client, however, you as the service developer, can provide an implementation (or a code skeleton, or tools that can generate an implementation) for the clients to use if they want (e.g. they may not care about the details of the communication protocol, or caching, etc., and your proxy may handle some or all of that for them). In that case, they may treat it as a 3rd-party component, and may wrap it into an Adapter to change the interface to suit their needs, and reduce coupling to your service.

  • Thanks Filip. So, are you suggesting I should put it into Samples?
    – Marshall
    Feb 23, 2018 at 18:01
  • @Marshall: In general, you should do what makes sense for you and the people you work with. To me, Samples sounds like a place you can find some sample code that demonstrates how things are used, so if I needed a reusable implementation of a proxy (in whatever form) I wouldn't look for it there. If I found it in the Clients folder, or ClientUtils, or something, that would make sense to me personally, but for some people it may make more sense to look for it at the same place where the rest of the service code is. So I guess it comes down to your preference, and good documentation. Feb 23, 2018 at 18:25
  • Gotcha, yeah. That makes sense. One more follow up question. Would you move the Proxy dll to company's private nuget then? I could keep the implementation of this Proxy class in the service, and deploy it into nuget. What do you think?
    – Marshall
    Feb 23, 2018 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.