Tuesday, April 3, 2012

WCF Beginners : Starting with Web Services

This is first post in the series of post I will be writing for WCF.
You will find plenty of material on this subject, I feel writing about it, just to note down key points required to be known, at one place. I may have made some mistakes as I am no expert in this topic, would appreciate your feedback, so I can correct mistakes if any.

WCF..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


Web Service in General
A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer. This interoperability (e.g., between Java and Python, or Windows and Linux applications) is due to the use of open standards. The services have the general advantage of being loosely-coupled instead of hard-coded from one application to another. A loosely-coupled relationship implies that any client created on any platform can connect to any service as long as the essential contracts are met.
XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions. The HTTP protocol is the most used Internet protocol.
Web services platform elements:
Protocol
  • SOAP (Simple Object Access Protocol)
    • SOAP is a protocol for accessing a Web Service
    • XML messaging using SOAP as the format.
    • Enhanced with WS-* protocols, can be used with any transport protocol.
  • REST
    • Representational State Transfer or REST basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object (in practice most of the services use a POST for this).
    • Modeled as ‘Resources’ with Unique identifiers
    • Uniform service contract: GET, PUT, POST, DELETE, HEAD
    • Resources can be represented as XML, RSS, JSON
Web Services Inspection Language
  • UDDI (Universal Description, Discovery and Integration)
    • UDDI is a directory service where companies can register and search for Web services. It is the goal of the proposed Web Services Description Language (WSDL) to describe services at a functional level.
  • WSDL (Web Services Description Language)
    • WSDL is an XML-based language for locating and describing Web services. The Universal Description, Discovery, and Integration (UDDI) schema aims at providing a more business-centric perspective.
Using SOAP and Web Services Description Language (WSDL)
 











Using SOAP,Universal Description, Discovery, and Integration (UDDI)

 

















In .Net
Initially Microsoft made many attempts(good once) towards different services,

  • DCOM/COM+/ES : Component oriented (RPC) distributed transaction, DCOM infrastructure
  • .NETRemoting : Component oriented (RPC), more simpler and highly extensible CLRinfrastructure
  • MSMQ : Message Oriented Asynchronous/durable and reliable MSMQ infrastructure.

Later came,

  • ASP.NET ASMX web services : simple support for SOAP
  • WEB Service Enhancement for WS security and TCP support

And then came WCF,


I won’t be digging in ASP.NET Web services too much, but I feel necessity to compare WCF and Web services before we move ahead with different aspects of WCF.


ASP.Net Web Services Vs WCF
Figure courtesy MSDN, specifies deference between different .Net technology and WCF
 

 







For more details regarding comparison between this two, I won’t be writing anything more than what is mentioned in the article here , this post is not really about the difference but aim is to get started with WCF.
Well, not to make this post any lengthier, I will conclude 1st part here.
Next part we will start with ABC of WCF:

0 comments:

Post a Comment