Thursday, December 5, 2013

WCF mostly used words Defination & Explanation

Friends let me clear some words which we often use in our Services,WCF and in other streams.
I would feel to understand about any technology (ex:WCF),we should aware of its basic stuff which will hit us mostly and improper understanding or ignorance of it may effect in understanding of technology.

In this post let us we clarify about mostly used words in WCF in simple and best way which would help you a lot while going in deeper.

Protocol:
What is a Protocol?
A standard set of regulations and requirements that allow two electronic items to connect to and exchange information with one another.
Among the most common Internet protocols are FTP (File Transfer Protocol), HTTP (Hypertext Transfer Protocol), TCP/IP (Transfer Control Protocol/Internet Protocol), and SMTP (Simple Mail Transfer Protocol).

WWW:
What is WWW(World Wide Web)
Stands for "World Wide Web." It is important to know that this is not a synonym for the Internet. The World Wide Web, or just "the Web," as ordinary people call it, is a subset of the Internet.World Wide Web is a system of interlinked hypertext documents accessed via the Internet.
HTTP:
What is HTTP?
HTTP is the protocol to exchange or transfer hypertext.WWW uses HTTP.
(or)
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.

WSDL:
What is WSDL?
A WSDL is an XML document that describes a web service. It actually stands for Web Services Description Language.
SOAP:
What is SOAP?
SOAP (Simple Object Access Protocol) is a way for a program running in one kind of operating system  to communicate with a progam in the same or another kind of an operating system  by using the World Wide Web's Hypertext Transfer Protocol (HTTP)and its Extensible Markup Language (XML) as the mechanisms for information exchange.
(Or)
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It relies on XML Information Set for its message format, and usually relies on other Application Layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol(SMTP), for message negotiation and transmission.

SOAP specifies exactly how to encode an HTTP header and an XML file so that a program in one computer can call a program in another computer and pass it information. It also specifies how the called program can return a response.

REST:
What is REST?
Rest is a simple way of sending and receiving data between client and server and it doesn't have very many standards defined. You can send and receive data as JSON, XML or even plain text. It's light weighted compared to SOAP.

Uderstand REST & SOAP Difference From Below Image:
Bindings:
What is WCF Binding? 
Bindings specify how a Windows Communication Foundation (WCF) service endpoint communicates with other endpoints. At its most basic, a binding must specify the transport (for example, HTTP or TCP) to use. You can also set other characteristics, such as security and transaction support, through bindings.
I would explains you in one words about bindings?
BasicHttpBinding:

Uses HTTP over XML,low security and weak intoeroperability.BasicHttpBinding:It uses HTTP and HTTPS transport for communication,it gives more security and more strong interoperablity.

WSDualHttpBinding:

This binding is same as that of WSHttpBinding, except it supports duplex service. 

WSFederationHttpBinding

This binding support federated security. 

Federated security allows for clean separation between the service a client is accessing and the associated authentication and authorization procedures. Federated security also enables collaboration across multiple systems, networks, and organizations in different trust realms.

NetTcpBinding


This binding provides secure and reliable binding environment for .Net to .Net cross machine communication. It uses TCP protocol and provides support for security, transaction and reliability.

NetNamedPipeBinding

This binding provides secure and reliable binding environment for on-machine cross process communication. It uses NamedPipe protocol and provides full support for SOAP security.

NetMsmqBinding

This binding provides secure and reliable queued communication for cross-machine environment.

Queuing is provided by using MSMQ as transport. 

NetPeerTcpBinding

This binding provides secure binding for peer-to-peer environment and network applications.

It uses TCP protocol for communication 

There are different types of Bindings in WCF you can refer at:
http://dotnetmentors.com/wcf/when-to-use-which-binding-in-wcf.aspx
http://wcftutorial.net/wcf-types-of-binding.aspx

Service & Operation Contract Attributes:

The ServiceContract defines the service's contract - it's shape and form. It defines the name of the service, it's XML namespace etc., and it's typically an interface (but could also be applied to a class) that contains methods decorated with the [OperationContract] attribute - the service methods.
Operation Contract attribute Indicates that a method defines an operation that is part of a service contract in a Windows Communication Foundation (WCF) application.
Data contract Attribute:
It describes the custom data type which is exposed to the client. Data types like int, string are identified by the client because it is already mention in XML schema definition language document, but custom created class or datatype cannot be identified by the client e.g. Employee data type. By using DataContract we can make client aware that we are using Employee data type for returning or passing parameter to the method.

Message Contract Attribute:

Default SOAP message format is provided by the WCF runtime for communication between Client and service. If it is not meeting your requirements then we can create our own message format. This can be achieved by using Message Contract attribute.

Endpoint

Using endpoint clients can communicate with service. Endpoint is an access point for clients to service functionality. Endpoint contains Address, Bindings Contract which is commonly called as Endpoints ABC.
  • Address

     Provides information about its location.
  • Binding

    Endpoint Binding specifies what kind of protocols should be used to communicate to clients.
  • Contract

    Endpoint Contracts gives details about what agreement needed between service and client means what operations are avilable for client.

InterOperability:
What is Interoperability in .NET?
Interoperability enables you to preserve and take advantage of existing investments in unmanaged code. Code that runs under the control of the common language runtime (CLR) is called managed code, and code that runs outside the CLR is called unmanaged code. COM, COM+, C++ components, ActiveX components, and Microsoft Win32 API are examples of unmanaged code.
The .NET Framework enables interoperability with unmanaged code through platform invoke services, the System.Runtime.InteropServices namespace, C++ interoperability, and COM interoperability (COM interop).

Encoding:
WCF Encodings:
Explained well in previous post:

No comments: