Friday, August 1. 2008
.NET Framework 2.0 relies on several distributed programming technologies. Maybe you are already familiar with Web & Enterprise Services, .NET Remoting, WSE... All these technologies have some advantages and drawbacks that make them more or less suitable for performing certain tasks.
For example, when creating an application that is supposed to be distributed over the Internet, on different machines with different operating systems, Web Services are what we need, because they offer an elegant and unambiguous way for different kinds of machines to communicate.
If our distributed application is going to run in company LAN (or maybe even just on local machine), on computers that all run .NET Framework, interoperability is not really a problem, but we would like to optimize the communication and get the best possible performance. Here, .NET Remoting is the way to go.
However, there are situations when it is necessary to combine different technologies in order to accomplish a given task. Although this isn't impossible, it may be expensive, hard and tricky to develop and maintain such a system. As a response to such situations, .NET 3.0 offers (and .NET 3.5 improves) something called Windows Communication Foundation (or simply WCF). The basic idea behind WCF is to integrate all distributed technologies that existed in older versions of .NET framework and put them under one roof, so they can be used easily and in the same fashion together.
Furthermore, WCF is a natural foundation for applications that follow SOA (Service Oriented Architecure) principles. For example, the concept of service contract is depicted as an interface. You define and implement a service contract simply by creating and implementing an interface! If you would like to take a deeper look at WCF and its possibilities, this MSDN page is a good place to start: Have fun!