REST API gaining popularity

Tarun Manrai
Dev Genius
Published in
3 min readJul 3, 2020

--

In more recent years the REST design pattern emerged which provided new benefits for both the client and server. On the server-side REST scales and performs better than SOAP. With SOAP there is significant overhead with parsing and routing each request to local web service function implementations. While REST leverages standard HTTP/S requests and does not require complex SOAP Envelope repackaging of data.

Full Article:
http://entradasoft.com/blogs/rest-api-gaining-popularity

what is an API?

An application program interface (API) is a set of routines, protocols, and tools for building software applications. Basically, an API specifies how software components should interact. In other words, an API is the messenger that delivers your request to the provider that you’re requesting it from and then delivers the response back to you

Why do we need API?

The development of apps for mobile devices meant that organizations needed to allow users to access information through apps and not just through the Internet. Within the public sector, APIs are used to allow agencies to easily share information and also lets the public interact with government as well. The importance of APIs from a technical standpoint, they allow the capabilities of one computer program to be used by another. They are a means by which two different programs are able to communicate.

what is an REST API?

A REST API works in a similar way. You search for something, and you get a list of results back from the service you’re requesting from. The developer creates the API on the server and allows the client to talk to it. REST determines how the API looks like. It stands for “Representational State Transfer”. 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 typically takes advantage of HTTP. One of the key advantages of REST APIs is that they provide a great deal of flexibility.

Principles of REST architecture

Uniform Interface:

The concept of resources in a REST API defines that the user can define any information or any module as a resource. When we think about RESTful architectures, everything can be considered a resource. For example if you are trying to create an application for employee management system. This application can be created using any language, on any platform and for any platform. Similarly any database can be used to handle backend services.

Stateless:

In a RESTful architecture all the responses and requests, all the communication between servers is stateless. This means that the server does not maintain any state of the system so the client has to send a request which is complete in itself. The request is not dependent on any of the previous requests made.

Cacheable:

In the case of RESTful architecture all the caching takes place at the client’s side. Whenever a client sends a request to the server, the server gives back the response which contains the actual data and along with other metadata which tells the client whether it has to store the response locally or not.

Layered System:

The REST principle states that whenever there is communication between the client and the server there can be multiple layers in between and these layers can be sued for a number of purposes like message translation to improve performance, caching and a lot of other stuff.

Code on Demand:

This is an optional constraint of RESTful Web Services it works when the user sends a request to get a response back. The response has the ability to run some code on the client’s side; this principle extends the functionality of the communication that is taking place.

REST is much easier than other approaches such as SOAP which keeps developers from having to reinvent the wheel as far as HTTP request operations go. SOAP also requires separate server and client programs.

Since REST is based on standard HTTP operations, it uses verbs with specific meanings such as “get” or “delete” which avoids ambiguity. Resources are assigned individual URIs, adding flexibility.

With REST, information that is produced and consumed is separated from the technologies that facilitate production and consumption. As a result, REST performs well, is highly scalable, simple, and easy to modify and extend.

Read more:
http://entradasoft.com/blogs/rest-api-gaining-popularity

--

--