Understanding WCF basics

WCF services writing and consuming related basic points are as in short - 

  • Service : A service is a unit of functionality, available to the world on some contract or deal.
  • Client : A Client is nothing but a service consuming party. It uses the required protocols to consume/use the exposed services.
  • Message Exchange Pattern : Communication between these Service & Client is made through messages. These messages are designed on some rules/patterns. There are 3 category of message exchange patterns -
      1. Request/Response  ( this is the default format)
      2. One Way
      3. Duplex
  • Serialization : A communication between service and client is done on internet. A complex object type data is directly not transport over the internet but it is converted into a transferable/transportable format. This conversion process is known as Serialization. There are 2 main way of doing this -
      1. Opt-in ( this is the default approach)
      2. Opt-out
  • WCF services Hosting : Hosting of WCF service is required before using the service. For hosting, we need -
      1. a managed process
      2. a service host instance and
      3. a well configured endpoint
  • Hosting approaches : There are 2 category mainly -
      1. in managed application  ( this is also known as - Self Hosting )
      2. on web server   2.1 ) IIS        and 2.2) WAS
  • Steps to create and consume a WCF service : There are mainly 6 steps to create a new WCF service and how to consume this service from client. There are as below - 
      1. Define a service contract
      2. Implement this defined contract
      3. Host the service, so that it can be consumed or used by clients
      4. Creating a client proxy
      5. Configuring client application to consume the service
      6. Call the service operation that is exposed by service using the created client proxy