Images

Web API and WCF the Most poppuler Frameworks of Microsoftt

 

Created by Microsoft with.NET, WCF (Windows Communication Foundation), provides platforms to build secure and reliable service. While Web API framework is used to make HTTP service and is used to create complete REST service.

dfii3

In this article, we will discuss the basic differences between Web API and WCF:

Representational State Transfer (REST)

Rest is the architecture design pattern, used to build and create Web Services. These architecture design patterns are used by the Web API to build web services. Web API utilizes POST, DEL, PUT and GET verbs for the communication purposes to the client and is fully REST supported.

Simple Object Access Protocol [SOAP]

Invented by Microsoft, SOAP is a protocol, which creates an organized format information or message, which can be transferred to the internet. It uses XML format and is the main foundation of WCF. While, WSDL is the file created by Web Service, and it is basically utilized by the client to find out the methods that are available on the service.

Speed

HTTP response/requests are normally smaller as compared to SOP response/request, because, RESTful services use HTTP protocol to get access to the client. So, Web API is the best option to access client, especially for low bandwidth devices/mobile devices.

Security

When we compare WCF vs Web API, both of these frameworks provide security standards, Web API utilizes web standard security, for example, fundamental validation, token verification and for more intricate, for example, OAuth; Web API gives greater adaptability. At that point utilize SOAP when you will validate with outside administrations, for example, google, facebook, and so forth.

wcf-vs-web_v_3

But, WCF service gives us high-level security system which gives enterprise-level security. It utilizes WS-I standard to give secure service.

Along these lines, we can’t choose which is superior to the next. Be that as it may, I would focus on the two points. Initially, WCF is best if you want to create service on various platform and Web API is best if you are going to create internet service for different platforms.

Advertisements

Clustered vs Non clustered index

Clustered Index

1. A table can contain only one clustered index

2. On creation of primary key clustered index will be created automatically

3. Clustered index store the data in sequential order Dec /Asc

4. Clustered index can be applied to more than one columns that are called composite clustered index

Example Composite clustered index:

Create clustered index  emp_name_email on Employee(Name desc,Email asc)

Non clustered index

Non clustered index store in the different table with index column and row address
———————

ID Name      Email

———————————

1  A      g@gmail.com

2  B      b@gmail.com

3  C      c@gmail.com

———————————
Non clustered index table

————————

Name RowAddressed

————————

B             Row Address

————————
A clustered index is faster then nonclustered index why?

because of nonclustered index store data in the seprate table so it has to look to the main table for looking for other columns details so it will require on more lookup to the master table.

 

Interface vs Abstract class in C#

What is Interface?

An interface is a contract with the list of the method defined in the interface.An interface can only have the method definition.Any class implementing the interface should implement all the methods defined in the interface.

What is Abstract Class?

An abstract class is a special kind of class which can not be instantiated, the main purpose of  abstract class is to define the contract for all subclasses,

The difference between Interface and Abstract class?