What is New in WCF 4.5?

In the .NET Framework 4.5 Developer Preview, the following features have been added to make it simpler to write Windows Communication Foundation (WCF) applications:

1- Simplification of generated configuration files.
2- Support for contract-first development.
3- Ability to configure ASP.NET compatibility mode more easily.
4- Changes in default transport property values to reduce the likelihood that you will have to set them.
5- Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
6- Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
7- New asynchronous streaming support.
8- New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
9- Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
10- Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
11- Support for configuring services in code.
12- XML Editor tooltips.
13- ChannelFactory caching support.
14- Binary encoder compression support.

Service Oriented Architecture (SOA) and WCF

Challenge
As business requirements are always changing, updates and modifications need to be made quickly. In traditional architecture, all components are bundled together, which means to make one update, a number of other components need to be recompiled and redeployed. The processes of gathering requirements, designing, development, QA, and deployment are too long for businesses to wait for, and become actual bottlenecks. To complicate matters further, some business processes are no longer static. Requirements change regularly, and a business needs to be able to redefine its own processes quickly and easily. Existing traditional infrastructure and systems make changes very difficult, but Service Oriented Architecture is an efficient alternative.

Solution
SOA is an architectural design pattern where its design is determined by several guiding principles. Essentially, SOA states that every component of a system should be a service or business process, and the system should be composed of several independent, loosely-coupled services. Services are designed and implemented so that they can serve different purposes or processes, and not just specific ones. The key concepts of SOA are services, high interoperability and loose coupling. SOA is not a specific technology or language, but a system design approach. It is an architecture model that aims to enhance the efficiency, agility, and productivity of an enterprise system. The difference between SOA and other approaches like RPC, DCOM, and CORBA is that SOA is trying to address the problem from the client side, and not from the server side. By decoupling the client side from the server side, the client side application is much easier to develop and maintain. A change to one service does not affect any other service. Also, the deployment of a new service does not affect any existing service. This greatly eases release management and makes SOA very agile. Without SOA, the client-side application is often compiled and deployed along with the server-side applications. This makes it impossible to quickly change anything on the server side. The client-side applications remain tightly coupled with remote objects, and any change to the remote object will still result in a recompiling or redeploying of the client application. However with SOA, the client applications no longer see them as objects, but services.  The client application interacts with these services by exchanging messages, and only knows the interfaces, or protocols of the services.

Benefit
SOA can be implemented by using web services, particularly with WCF services.  WCF is an umbrella technology that covers ASMX web services, .NET remoting, WSE, Enterprise Service, and System.Messaging. WCF is configurable to communicate with web services using both SOAP and XML messages. Because WCF can communicate using web service standards, interoperability is straightforward with other platforms that also support SOAP, such as the leading J2EE-based application servers. It supports a large set of the WS-* specifications, and helps to provide reliability, security, and transactions when communicating with any platform that supports these specifications. Microsoft also developed WCF to be one of the fasted distributed application platforms.
All client applications communicate with a service through its interface, and its interface will remain stable once it is in production. If we have to change the implementation of this service, for example by fixing a bug, or changing an algorithm inside a method of the service, all of the client applications can still work without any change.
When combined with the more mature Business Process Management (BPM) technology, SOA plays an even more important role in an organization’s efforts to achieve agility. Business users can create and maintain processes within BPM, and through SOA they can plug a service into any of the processes. The front-end BPM application is loosely coupled to the back-end SOA system. This combination of BPM and SOA will give an organization much greater flexibility in order to achieve agility.

WCF Useful Links

The Windows Communications Framework (WCF) is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise.

The following links are useful to learn the WCF programing model:

Overview of WCF

1-      Introduction

http://social.msdn.microsoft.com/Forums/en-SG/tfsbuild/thread/59c4dc2d-1b34-4099-b79d-03e4024fe003

2-      Best Practices: Data Contract Versioning

http://msdn.microsoft.com/en-us/library/ms731060.aspx

3-      Best Practices: Service Versioning

http://msdn.microsoft.com/en-us/library/ee358764.aspx

4-      Configuration-Based Activation in IIS and WAS

http://msdn.microsoft.com/en-us/library/aa751792.aspx

5-      Deploying an Internet Information Services-Hosted WCF Service

http://msdn.microsoft.com/en-us/library/gg258442.aspx

6-      Developing and Deploying WCF Data Services

http://archive.msdn.microsoft.com/AstoriaDocSamples

7-      WCF and TFS 2008 Build Deployment

http://msdn.microsoft.com/en-us/library/ms733832.aspx

More »

Windows Communication Foundation (WCF)

WCF is Microsoft’s unified programming model for building service-oriented applications

What makes WCF so unique?

– Programming model

– Scalability

– Interoperability

– Enhanced communication

– Enterprise enabled

Programming Model

The great thing about WCF is that there is no “right way” to get from point A to point B. If fact, WCF lets users start at point A and go to point B any way they see fit. This is because the programming model in WCF lets developers control how and when they want to code things and yet gives them the ability to do that with a minimum amount of code.
There are only a small handful of major components that a developer will need to work with to build high-class services. However, WCF also lets developers drill down to lower-level components if they desire to get more granular with their options. WCF makes this very simple. The WCF programming model lets a developer take whichever approach he or she desires. There is no single “right” way.
The programming model also combines many of the earlier technologies, such as the ones mentioned earlier in the chapter (MSMQ, COM+, WSE, and so on), into a single model.

Scalability

WCF services scale, and they scale in all directions. Not just up or out, but in all directions. They scale out via routing mechanisms and farms. Services scale up by not being tied to a single OS or processor. Services scale up by the pure ability to deploy them on bigger and better servers and taking advantage of the new processor technologies that are starting to appear.
Services scale in by way of cross-process transports, meaning on-machine and cross-machine messaging and Object-RPC.
Services scale down by interfacing and communicating with devices such as printers, scanners, faxes, and so on.

Interoperability

How sweet is it to be able to build high-class services using a single programming model and at the same time take advantage of earlier technologies, irrespective of the OS, environment, or platform? WCF services operate independent of all of these.
WCF services also take advantage of the WS architecture utilizing the already established standards as far as communication and protocols are concerned.

Enhanced Communication

Services are not picky as far as transports, formats, or much else. You as a developer can choose from a handful of transports, different message formats, and surplus of message patterns. A service can use TCP, HTTP, Named Pipes, or any other protocol to communicate.
The reason it is this way is because, as you hopefully have figured out by now, communication is completely separate from the service. They are completely independent from one another.

Enterprise Enabled

A lot of times there is a give-and-take relationship when dealing with web services, interoperability, and other important features geared toward enterprises. As a developer you have to weigh performance versus security, or reliability. At what cost does adding transactional capabilities add to your solution? Up until now, having the best of all worlds was a mere pipe dream.
Well, now it is time to wake up and smell the technology because WCF provides the ability to have security and reliability without sacrificing performance. And you can throw transactions into the mix as well.
A lot of this comes from the standards of the web service architecture, allowing you to build enterprise- class applications.

Copyright © All Rights Reserved - C# Learners