Wednesday, November 18, 2009

Unleashed – Winodws Communication Foundation 4.0

The .NET Framework 4 comes with some compelling new features and welcomed improvements in the area of Windows Communication Foundation (WCF).

These WCF enhancements focus primarily on simplifying the developer experience, enabling more communication scenarios, and providing rich integration with one of the good foundation called Windows Workflow Foundation (WF).
WCF in .NET 4 comes with a wide range of specific features. Let us look them at the broader level.

Simplified Configuration

To make WCF configuration as much as easy for developer, the .NET 4 releases comes with a new “default” configuration model that completely removes the need for any WCF configuration.

If you don’t provide any WCF configuration for a particular service, the WCF runtime will automatically configure your service with some standard endpoints and default binding and behavior configurations.

Isn’t it a cool feature which they offered?
Simplification of the WCF configuration section through support for default endpoints, binding and behavior configurations.

These changes make it possible to host configuration-free services, greatly simplifying the developer experience for the most common WCF scenarios.

Discovery

WS-Discovery is an OASIS specification that defines a SOAP-based protocol for dynamically discovering the location of service endpoints at run time.

WS-Discovery defines two primary modes of operation: ad hoc mode and managed mode. In ad hoc mode, clients probe for services by sending multicast messages.

With managed service discovery, you provide a discovery proxy on the network that “manages” the discoverable service endpoints.

WCF in .NET 4 provides a complete implementation of the WS-Discovery protocol, and it provides support for both the ad hoc and managed discovery modes.


Routing Service

WCF in .NET 4 comes with a new class called Routing Service, which provides a generic WCF routing implementation for use within your applications.

The Routing Service can handle routing messages over any WCF-supported protocol using a variety of different messaging patterns.
New framework support for a configurable routing service that you can use in your WCF solutions. Provides features for content-based routing, protocol bridging, and error handling.

REST Improvements


REST is Representational State Transfer. It is the architectural style of building web services.Here they have introduced two things:

1. Automatic help page that describes Restful services to consumers of the service.
2. Support for declarative caching.These features were first introduced by the WCF REST Starter Kit last year and are now making it into the official framework.

Enhances the WCF 3.5 Web programming model with some additional features that simplify REST service development.


Workflow Services

This is the feature which received most attention in .NET 4.0. Here in .net 4.0 they have provided many improvements in integration of WCF and WF.

Although this has been possible since .NET 3.5, .NET 4 has made huge strides in improving the developer experience and providing some of the needed features that were missing in .NET 3.5.For example .NET 4 comes with new-and-improved hosting infrastructure for workflow services.
It also provides a standard workflow control endpoint for managing workflow instances remotely.
Rich new framework support for integrating WCF with WF to implement declarative long-running workflow services. This new programming model gives you the best both frameworks have to offer (WCF & WF).