WCF Features in .NET Framework 4.0

Introduction

WCF providing a way to define service contracts and to configure endpoint definitions using the declarative XAML in .NET Framework 4.0. You can read the following articles to better understood the WCF features in .NET FW 4.0.

Consider the WCF service contract definition:

WCF1.gif

In .NET Framework 4.0, you can define the same contract declaratively using the following XAML definition:

WCF2.gif

We have defined service contract in XAML, the next step is defining the projection of contract over wire.NET Framework 4.0 introduces the concept of a contract-projection to separate the logical contract definition from the message.

It allows you to define a single-service contract and can projected differently to support different message styles.
Example: You can have one contract projection for SOAP based messaging and another projection for REST messaging.


SOAP contract projection for the service contract that we defined above

WCF3.gif

The Service Implementation logic in XAML looks like

WCF4.gif

Pain thing is there is no visual designer to build the services declaratively.

More features like you can manage workflow services with new "Dublin" extensions. Improved configuration, message correlation is expecting in new FW.

You can read Dublin features article to know how WCF services can be managed in FW 4.0

Source: MSDN magazine Jan issue


Similar Articles