Techbubbles

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.

Consider the WCF service contract definition:

IcalService

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

XAML

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

Projection

The Service Implementation logic in XAML looks like

servicedef 

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

Technorati Tags: ,


Share this post :


Related Posts:

%d bloggers like this: