Wednesday, January 1, 2014

1) What is Windows Communication Foundation (WCF)?

    WCF is an unification of .NET framework communication technologies. That means, it unites the following technologies:-

  • .NET Remoting
  • MSMQ
  • Web services
  • COM+
NOTE:- The code name for WCF is "INDIGO".

2) What are ends, contract, address and bindings?

     Every service must expose one or more ends by which the service can be available to the client. End   consists of three important things where, what and how:-

       • Contract (What)
 
                         Contract is an agreement between two or more parties. It defines the protocol how client should communicate with your service. Technically, it describes parameters and return values for a
method.

       • Address (Where)
 
                         An Address indicates where we can find this service. Address is a URL, which points to the
location of the service.

       • Binding (How)
                  
                         Bindings determine how this end can be accessed. It determines how communications is done. For instance, you expose your service, which can be accessed using SOAP over HTTP or
BINARY over TCP. So for each of these communications medium two bindings will be created.

3) What are the main components of WCF?
   
     The three main components of WCF are:-
  1. Service class
  2. Hosting environment
  3. End point            

4) Which specifications does WCF follows?

            WCF supports specifications defined by WS-* specifications. WS-* specifications are defined
together by Microsoft, IBM, SUN and many other big companies so that they can expose there
service through a common protocol. WCF supports all specifications defined we will understand
them one by one.

      • Messaging (WS-Addressing)
           
                            SOAP is the fundamental protocol for web services. WS Addressing defines some extra additions to SOAP headers, which makes SOAP free from underlying transport protocol. One of the good things about Message transmission is MTOM, also termed as Message Transmission Optimization Mechanism. They optimize transmission format for SOAP messages in XML-Binary formant using XML optimized packaging (XOP). Because the data will sent in binary and optimized format, it will give us huge performance gain.

• Security (WS-Security, WS-Trust, and WS-Secure Conversation)

                            All the three WSdefine authentication, security, data integrity and privacy features for a service.
 
• Reliability (WS-Reliable Messaging)
                
                            This specification ensures end-to-end communication when we want SOAP messages to be traversed back and forth many times.

• Transactions (WS-Coordination and WS-Atomic Transaction)
                 
                             These two specifications enable transaction with SOAP messages.

• Metadata (WS-Policy and WS-Metadata exchange)
                   
                             WSDL is a implementation of WSMetadata Exchange protocol. WS-Policy defines more dynamic features of a service, which cannot be expressed by WSDL.

   NOTE:-
                    We have stressed on the WS-* specification as it is a specification which a service has to follow to be compatible with other languages. Because WCF follows WS-* specifications other
languages like JAVA , C++ can also exploit features like Messaging , Security , Reliability and
transactions written in C# or VB.NET. This is the biggest achievement of WCF to integrate the
above features with other languages.