Interviews - C# Corner

Vivek Kumar
What are the advantages of using REST in Web API?
By Vivek Kumar in ASP.NET on Feb 07 2016
  • Vivek Kumar
    Feb, 2016 7

    REST always used to make less data transfers between client and server which makes REST an ideal for using it in mobile apps. Web API supports HTTP protocol thereby it reintroduces the old way of HTTP verbs for communication.

    • 17
  • Santosh Kumar Adidawarpu
    May, 2016 8

    1. Light weight 2. Only deal with message 3. Less configuration needed as compared to WCF 4. Inbuilt support for JSON 5. It is preferable for mobile devices as it is less weight and supports JSON message format. 6. Easy to access 7. Interoperable 8. Stateless 9. Scalable etc.

    • 7
  • Munesh Sharma
    Feb, 2016 9

    http://www.dotnet-tricks.com/Tutorial/webapi/VG9K040413-What-is-Web-API-and-why-to-use-it-?.html

    • 7
  • Nikhil Sangani
    Jun, 2016 6

    1.Easy to use. 2. Less data trasfer between client and server. 3. using webapi we can develop cross domain application.

    • 4
  • Bikesh Srivastava
    Aug, 2016 4

    A "REST API" is two things: it's a web service and it's RESTful. By virtue of being a web service, you get some loose coupling. The client need not be aware of internal implementation details and there is, as you note, a real opportunity for platform/language independence.

    • 3
  • Bikesh Srivastava
    Aug, 2016 4

    A "REST API" is two things: it's a web service and it's RESTful. By virtue of being a web service, you get some loose coupling. The client need not be aware of internal implementation details and there is, as you note, a real opportunity for platform/language independence.

    • 3
  • Keerthi Venkatesan
    Jun, 2016 8

    It supports convention-based CRUD Actions since it works with HTTP verbs GET,POST,PUT and DELETE. Responses have an Accept header and HTTP status code. Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter. It may accepts and generates the content which may not be object oriented like images, PDF files etc. It has automatic support for OData. Hence by placing the new [Queryable] attribute on a controller method that returns IQueryable, clients can use the method for OData query composition. It can be hosted with in the applicaion or on IIS. It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection that makes it more simple and robust.

    • 3
  • Shamim Uddin
    Oct, 2016 19

    Today, a Web- based Application is not enough for real world Because People are so much smart they using different kind of device and mobile in daily life like iPhone, tablets and embedded system. These device have lot of apps for making the easy life. Actually we are moving from the web toward Apps World.

    • 2
  • Kap Shivhare
    Jul, 2016 17

    http://www.dotnet-tricks.com/Tutorial/webapi/VG9K040413-What-is-Web-API-and-why-to-use-it-?.html

    • 2
  • Balamurali Krishnan R
    Jun, 2016 17

    consume service without create proxy class in our application.

    • 2
  • Balamurali Krishnan R
    Jun, 2016 17

    consume service without create proxy class in our application.

    • 2
  • Kap Shivhare
    May, 2016 29

    https://blogs.msdn.microsoft.com/martinkearn/2015/01/05/introduction-to-rest-and-net-web-api/

    • 2
  • Hamid Khan
    Apr, 2017 15

    Hi Vivek, As per my understanding First of all i would like to clear, Web api is a fully REST(Repersentational State Transfer) based service, . It would be better if you comapre among Webservice, WCF and WebApi, but The main focus of using webapi, is to it is consume less bandwidth, and it is working on HTTP protocal. so if we don't need more secure data, we can use it. and its performance is best compare to other.

    • 1
  • Hamid Khan
    Apr, 2017 15

    Hi Vivek, As per my understanding First of all i would like to clear, Web api is a fully REST(Repersentational State Transfer) based service, . It would be better if you comapre among Webservice, WCF and WebApi, but The main focus of using webapi, is to it is consume less bandwidth, and it is working on HTTP protocal. so if we don't need more secure data, we can use it. and its performance is best compare to other.

    • 1
  • Shekhar Panwar
    Nov, 2016 3

    Hi! REST has advantages when: - You have a set of resources that you want to manipulate. - You want to support navigation between resources. For instance, when placing an order, you receive an URI to an order confirmation resource for the order in question. Before having confirmed the order, you may even want to modify it - something that can be done with the URI of the order received when placing the order. When having confirmed the order, you receive an URI to a payment service. After having paid the order, you receive an URI to an order status resource for the order in question. - You need scalability. RESTful web services are tyically stateless and therefore easily scalable. SOAP web service should also typically be stateless. - You want to improve performance by caching web service request results at some point between the service and the consumer. Caching on the URI of a service is very easy. SOAP has advantages when: - You want to publish a web service description (using WSDL). WSDL 2 can describe RESTful web service as well. WADL is an alternative to WSDL for RESTful web services. - You want to use security etc. that relies on the use of SOAP headers or some similar mechanism in which data is added and removed from a request. - You want better tooling support. - You want tested platform interoperability. This does not mean that interoperability between platforms is easy. It just means that someone has tested it using certain web service stacks. This is what I can think of right now. It would be interesting to hear about some other advantages/disadvantages. Personally I feel that there is room for both SOAP and REST in my toolbox.

    • 1
  • Aleena Saviour
    Nov, 2016 2

    Refer the following links 1.http://stackoverflow.com/questions/2191049/what-is-the-advantage-of-using-rest-instead-of-non-rest-http 2.https://www.quora.com/What-are-the-advantages-disadvantages-of-using-REST-API-over-native-libraries

    • 1
  • Ayush Jaiswal
    Oct, 2016 31

    The advantages of using REST in Web API? Go on http://impranshu.blogspot.in

    • 1
  • Atul Patil
    Oct, 2016 8

    REST has advantages when: - You have a set of resources that you want to manipulate. - You want to support navigation between resources. For instance, when placing an order, you receive an URI to an order confirmation resource for the order in question. Before having confirmed the order, you may even want to modify it - something that can be done with the URI of the order received when placing the order. When having confirmed the order, you receive an URI to a payment service. After having paid the order, you receive an URI to an order status resource for the order in question. - You need scalability. RESTful web services are tyically stateless and therefore easily scalable. SOAP web service should also typically be stateless. - You want to improve performance by caching web service request results at some point between the service and the consumer. Caching on the URI of a service is very easy.

    • 1
  • Ervis Trupja
    May, 2016 27

    I would sum up the answer in two main reasons: 1. Simplicity - It helps you organize even a very complex application into simple resources. 2. Efficancy - You can make good use of HTTP cache and proxy server to help you handle high load.

    • 1
  • Bhuvanesh Mohankumar
    May, 2016 18

    Used to build simple, non-SOAP-based HTTP Services on top of existing WCF message pipeline.

    • 1
  • Bhuvanesh Mohankumar
    May, 2016 18

    Simple service creation with Web API. With WCF REST Services, service creation is difficult.

    • 1
  • Kml Surani
    Apr, 2016 25

    REST always used to make less data transfers between client and server which makes REST an ideal for using it in mobile apps. Web API supports HTTP protocol thereby it reintroduces the old way of HTTP verbs for communication.

    • 1
  • Maruthi Palllamalli
    Mar, 2016 9

    A SOAP service can support TCP and Other protocols along with HTTP. But REST Can handle only HTTP. So if your service want to http means you can use REST. It is a best choice for API development.

    • 1
  • Khaleek Ahmad
    Feb, 2017 2

    REST is an architectural pattern. REST services are lightweight, and fast in comparison of SOAP. REST services can be called by any client like Mobile,Tab,Browser. REST services based on HTTP Verb, HTTP Response and HTTP request.

    • 0
  • ARAV RAJPUT
    Jan, 2017 31

    wcf insert,update,delete programme

    • 0
  • Thiruppathi R
    Jan, 2017 12

    Web API support pure REST Protocol and mainly developed for mobile base application.

    • 0
  • Amit Mishra
    Jan, 2017 10

    Hi,Could any one let me that I have created WCFRestfull services . I want to post large amount of data but it shows error:-414 Request-URI Too Long wcf 1> Can we post large amount of data in WCFRestfull service. If yes then how? If no then please let me know the reason.2>If you have any article related to this, please share.Thanks Amit

    • 0
  • Manoj Kumar
    Dec, 2016 28

    It's very light weight compare to other options It's Transfer the data using HTTP , the most supported format like mobile, desktop , laptop etc..,

    • 0
  • Subhashkumar Yadav
    Dec, 2016 16

    One of the most popular types of API is REST or, as they’re sometimes known, RESTful APIs. REST or RESTful APIs were designed to take advantage of existing protocols. While REST - or Representational State Transfer - can be used over nearly any protocol, when used for web APIs it it typically takes advantage of HTTP. This means that developers have no need to install additional software or libraries when creating a REST API.One of the key advantages of REST APIs is that they provide a great deal of flexibility. Data is not tied to resources or methods, so REST can handle multiple types of calls, return different data formats and even change structurally with the correct implementation of hypermedia. This flexibility allows developers to build an API that meets your needs while also meeting the needs of very diverse customers.Unlike SOAP, REST is not constrained to XML, but instead can return XML, JSON, YAML or any other format depending on what the client requests. And unlike RPC, users aren’t required to know procedure names or specific parameters in a specific order.But one of the disadvantages of RESTful APIs is that you can lose the ability to maintain state in REST, such as within sessions. It can be more difficult for newer developers to use.It’s important to understand what makes a REST API RESTful, and why these constraints exist before building your API.

    • 0
  • Mohammed Deeb Hammoudeh
    Dec, 2016 15

    1 - Light weight .2 - Separation between the client and the server. 3 - The REST API is always independent of the type of platform or languages.

    • 0
  • Mohini Shinde
    Dec, 2016 13

    the REST API always adapts to the type of syntax or platforms being used, which gives considerable freedom when changing or testing new environments within the development. With a REST API you can have PHP, Java, Python or Node.js servers. The only thing is that it is indispensable that the responses to the requests should always take place in the language used for the information exchange, normally XML or JSON

    • 0
  • Mohini Shinde
    Dec, 2016 13

    REST API would be processed by a set of client side language bindings, one for each of the data formats (media types)

    • 0
  • Rameshrao Nikam
    Nov, 2016 1

    Microsoft created separate framework for REST based web services development & instead of using WCF. & pros are JSON Out Put, Stateless, no more configuration & support for multiple device for less rendering data load etc.

    • 0
  • Rameshrao Nikam
    Nov, 2016 1

    Microsoft created separate framework for REST based web services development & instead of using WCF. & pros are JSON Out Put, Stateless, no more configuration & support for multiple device for less rendering data load etc.

    • 0
  • Rameshrao Nikam
    Nov, 2016 1

    Microsoft created separate framework for REST based web services development & instead of using WCF. & pros are JSON Out Put, Stateless, no more configuration & support for multiple device for less rendering data load etc.

    • 0
  • Rameshrao Nikam
    Nov, 2016 1

    Microsoft created separate framework for REST based web services development & instead of using WCF. & pros are JSON Out Put, Stateless, no more configuration & support for multiple device for less rendering data load etc.

    • 0
  • Ayush Jaiswal
    Oct, 2016 31

    REST is an architectural pattern which is based on HTTP and uses HTTP requests, responses, verbs and status codes to communicate. The fact that REST services use HTTP means they can be consumed by almost any ‘online’ device or application (including IoT devices such as toasters, cars, pedometers etc) – no proprietary knowledge of the API is required.

    • 0
  • Ayush Jaiswal
    Oct, 2016 31

    REST is an architectural pattern which is based on HTTP and uses HTTP requests, responses, verbs and status codes to communicate. The fact that REST services use HTTP means they can be consumed by almost any ‘online’ device or application (including IoT devices such as toasters, cars, pedometers etc) – no proprietary knowledge of the API is required.Web API in .net is the way you write REST APIs services in .net. Web API gives you all the benefits of the .net framework and deals with a lot of the complexities of content negotiation, model binding etc that you’d have to deal with yourself without Web API.

    • 0
  • Ayush Jaiswal
    Oct, 2016 31

    REST is an architectural pattern which is based on HTTP and uses HTTP requests, responses, verbs and status codes to communicate. The fact that REST services use HTTP means they can be consumed by almost any ‘online’ device or application (including IoT devices such as toasters, cars, pedometers etc) – no proprietary knowledge of the API is required.Web API in .net is the way you write REST APIs services in .net. Web API gives you all the benefits of the .net framework and deals with a lot of the complexities of content negotiation, model binding etc that you’d have to deal with yourself without Web API.

    • 0
  • Ayush Jaiswal
    Oct, 2016 31

    REST is an architectural pattern which is based on HTTP and uses HTTP requests, responses, verbs and status codes to communicate. The fact that REST services use HTTP means they can be consumed by almost any ‘online’ device or application (including IoT devices such as toasters, cars, pedometers etc) – no proprietary knowledge of the API is required.Web API in .net is the way you write REST APIs services in .net. Web API gives you all the benefits of the .net framework and deals with a lot of the complexities of content negotiation, model binding etc that you’d have to deal with yourself without Web API.

    • 0
  • Atul Patil
    Oct, 2016 8

    REST has advantages when: - You have a set of resources that you want to manipulate. - You want to support navigation between resources. For instance, when placing an order, you receive an URI to an order confirmation resource for the order in question. Before having confirmed the order, you may even want to modify it - something that can be done with the URI of the order received when placing the order. When having confirmed the order, you receive an URI to a payment service. After having paid the order, you receive an URI to an order status resource for the order in question. - You need scalability. RESTful web services are tyically stateless and therefore easily scalable. SOAP web service should also typically be stateless. - You want to improve performance by caching web service request results at some point between the service and the consumer. Caching on the URI of a service is very easy.

    • 0
  • Atul Patil
    Oct, 2016 8

    REST has advantages when: - You have a set of resources that you want to manipulate. - You want to support navigation between resources. For instance, when placing an order, you receive an URI to an order confirmation resource for the order in question. Before having confirmed the order, you may even want to modify it - something that can be done with the URI of the order received when placing the order. When having confirmed the order, you receive an URI to a payment service. After having paid the order, you receive an URI to an order status resource for the order in question. - You need scalability. RESTful web services are tyically stateless and therefore easily scalable. SOAP web service should also typically be stateless. - You want to improve performance by caching web service request results at some point between the service and the consumer. Caching on the URI of a service is very easy.

    • 0
  • Jitendra singh
    Sep, 2016 20

    Nice Bro

    • 0
  • TechieAdmin TechieAdmin
    Sep, 2016 2

    REST is Faster than others like SOAP etc. REST Provides output in various format like XML, JSON etc REST requires less bandwidth and resource than others. REST does not define too much standards like SOAP.

    • 0
  • Akash Varshney
    Aug, 2016 31

    Rest is Stateless and very light weight compare to web services. Rest can easily used in Mobile device application as well as Desktop application

    • 0
  • Suraj Binorkar
    Aug, 2016 22

    REST means using HTTP the way it's meant to be.Have look at ones **Roy Fielding's dissertation about REST** Some advantages are 1) Simple 2) You can make good use of HTTP cache and proxy server to help you handle high load. 3) It helps you organize even a very complex application into simple resources. 4) It makes it easy for new clients to use your application, even if you haven't designed it specifically for them (probably, because they weren't around when you created your app). Hope It will help you :)

    • 0
  • Soumalya Das
    Aug, 2016 11

    Less data trasfer between client and server.

    • 0
  • Rajendra Mote
    Aug, 2016 10

    It is light weight.faster and no need to to configuration settings in your web.config file like one we are doing for wcf services instead you can directly consume webapi.

    • 0
  • Chinmaya Dash
    Aug, 2016 2

    It supports convention-based CRUD Actions since it works with HTTP verbs GET,POST,PUT and DELETE.Responses have an Accept header and HTTP status code.Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter.It may accepts and generates the content which may not be object oriented like images, PDF files etc.It has automatic support for OData. Hence by placing the new [Queryable] attribute on a controller method that returns IQueryable, clients can use the method for OData query composition.It can be hosted with in the applicaion or on IIS.It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection that makes it more simple and robust.

    • 0
  • Ayush Jaiswal
    Jul, 2016 24

    Simple service creation with Web API. With WCF REST Services, service creation is difficult.

    • 0
  • Yogendra Gautam
    Jul, 2016 19

    REST does not enforces message format as XML or JSONIt has no defined standard specifications. REST uses the HTTP build-in headers (with a variety of media-types) to carry meta information and use the GET, POST, PUT and DELETE verbs to perform CRUD operations. REST uses URI and methods like (GET, PUT, POST, DELETE) to expose resources. REST is fast as compared to SOAP.

    • 0
  • Yogendra Gautam
    Jul, 2016 19

    REST does not enforces message format as XML or JSON.It has no defined standard specifications.REST uses the HTTP build-in headers (with a variety of media-types) to carry meta information and use the GET, POST, PUT and DELETE verbs to perform CRUD operations.REST uses URI and methods like (GET, PUT, POST, DELETE) to expose resources.REST is fast as compared to SOAP.

    • 0
  • jitendra virkayade
    Jun, 2016 7

    Being RESTful offers additional benefits aimed at additional decoupling, so as to allow extreme scalability.

    • 0
  • Keerthi Venkatesan
    May, 2016 13

    REST always used to make less data transfers between client and server which makes REST an ideal for using it in mobile apps. Web API supports HTTP protocol thereby it reintroduces the old way of HTTP verbs for communication.

    • 0
  • Bhuvanesh Mohankumar
    May, 2016 5

    No proxy required and also can be consumed by cross domain application and cross devices.

    • 0
  • Thiruppathi R
    May, 2016 3

    Refer this Site https://blogs.msdn.microsoft.com/martinkearn/2015/01/05/introduction-to-rest-and-net-web-api/

    • 0
  • Ramakrishna Basagalla
    Apr, 2016 27

    1) Less data transfer 2) Mainly concentrating on the data rather that it's tags 3) Faster compare with other approach 4) More useful with light weight devices (mobile, iPod's etc..) 5) Rest will only transforms data using .json or .xml formats

    • 0
  • Prakash Tripathi
    Apr, 2016 9

    Web API implicitly supports REST. REST has several advantages as following. 1. REST works on resource request and response model. request can easily be made using URLs. 2. Data transfer happens in JSON which is light weight. 3. Can easily be consumed in devices with low bandwidth network as data flow in less.

    • 0
  • Rahul Chavan
    Apr, 2016 6

    - Web API allows Content Negotiation- Allowing browser to decide which type of result it will require and Web API will return the required result. - These are Pure HTML response, no SOAP overhead. - Light weight - Security

    • 0
  • Pradeep Sahoo
    Mar, 2016 22

    REST is easier to use for the most part and is more flexible. It has the following advantages when compared to SOAP:No expensive tools require to interact with the Web service Smaller learning curve Efficient (SOAP uses XML for all messages, REST use JSON )

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS