O'Reilly logo
  • Curtis Turner thinks this is interesting:

It is possible to annotate a class — the concrete service implementation — with the [ServiceContract] attribute and its methods with the [OperationContract] attribute. However, there are several reasons why this is not recommended. One reason is that you will mix the "outside world" (the service contract) with the "inside world" (your implementation code), and this breaks the rule about having explicit boundaries. You should always decouple the abstract service definition from the concrete implementation, if you want to produce production code.


Cover of Professional WCF 4: Windows Communication Foundation with .NET 4


Important Pattern