After working with Windows Communication Foundation for a while, I've reached the conclusion that the two features in WCF that I like the most are:

1. Generic Service Contracts: That is, the combination of using simple contracts with a single, catch-all operation and untyped data contracts (a.k.a. the System.ServiceModel.Channels.Message class). Particularly for one way, scenarios, these are really powerful and flexible. In other words, stuff like this:

[ServiceContract]
public interface IGenericOneWayService
{
[OperationContract(Action="*", IsOneWay=true)]
void Execute(Message msg);
}

2. Custom Bindings: Creating custom bindings by composing arbitrary sets of BindingElements is extremely flexible and a provides an excellent extensibility mechanism, particularly when you introduce custom protocol channels (i.e. above the transport channel) into the mix.

It took a bit of time for these to finally "click" for me, but I know fully realize this is a pretty cool thing to have in the framework. I do wish there was better validation of custom bindings, as well as a way to specify declaratively the requirements and capabilities of binding elements.


Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.