Windows communication foundation provides the next generation of distributed communication on the basis of service oriented programming model. This articles gives you an overview of service orientation through WCF.
Current distributed system is mainly based on 4 different communication stacks.
- ASP.NET Web Services (ASMX) along with the Web Service Enhancements (WSE) extensions to build powerful service oriented application which enables cross platform interoperability and integration.
- The Microsoft Message Queue (MSMQ) enables transaction integration across multiple parties.
- The Enterprise Services/COM+ runtime environment
- .NET Remoting for communication with object across application domain boundaries.
Here the problem is about a single functional specification can take up to 4 implementations. That is, one implementation for each stack client. The implementation strategy for ASMX is quite different from that of Enterprise Services. Each stack client comes with its own architecture and API’s. Above all, COM+, Remoting and MSMQ are specific to Windows platform. Stateless nature of web service limits it’s from enabling context flows and call backs across platform boundaries. So, WCF is all about providing a single programming model that unifies the features of ASMX, MSMQ, Enterprise services and Remoting hence providing interoperability across platforms. Since WCF provides all of the features of these existing Microsoft technologies, WCF supports all of the scenarios currently supported by these technologies. In addition, WCF enables new scenarios that are currently not possible or very hard to implement with existing technologies because WCF allows you to compose functionality across these existing technologies. For example, this means that you’ll be able to achieve secure, reliable, transacted Web services by combining/composing the functionality that previously existed in silos.
BasicHttpBinding bhb = new BasicHttpBinding(BasicHttpSecurityMode.None);
host.AddServiceEndpoint(typeof(IBasicService), bhb, "WCF_BasicService_SOAP");
NetTcpBinding tcp =
So if you want to expose your service via HTTP and use SOAP 1.1 for maximum interoperability, and also want to expose it via TCP using a binary wire encoding for maximum performance, the two resulting endpoints can reside side-by-side on top of the very same service. WCF is a vendor neutral model based on web service stack (WS-*) defined by http://www.ws-i.org which enables transactions across windows to non-windows platform. In addition to this, WCF provides state management across platform boundaries and call backs over HTTP.
Here goes my second article.