Search This Blog

Thursday, March 11, 2010

Wcf Service Proxy Name / Namespace naming strategy

Programmer Question

Anyone have a naming strategy that works well for service proxy classes?



For example, if I am given three web services within two projects as follows:



XWs
AService.asmx
YWs
BService.svc
CService.svc


What would use as the Service Reference Name & Namespace for AService, BService and CService ?



In general, I'd like something in the proxy name/namespace to indicate that the thing being used is not a concrete class, but represents a proxy - both so it doesnt clash with usage of concrete classes [and force usage of aliasing or namespace-qualified class names], and so we're not hiding the fact that there's a hop happening (I guess the Wcf Service Proxy generator's default suffix of Client covers that). Also important is that it deals with cases where one is writing a wrapper/shim service that is forwarding a [sub]set of calls to another referenced service.



I've used various styles (Adding Ws, ServiceProxy, Ref or Proxy suffixes? Prefixing with ServiceName.), but have never been fully happy with them.



What's worked well for you? Any style guides make reference to a naming style?



Edit: While Cheeso's answer covers the bulk of my question, I'm still interested in hearing answers on:




  1. A strategy for namespacing proxy classes as in the example above

  2. A style guide that mentions a naming strategy for proxies



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails