https://www.linkedin.com/pulse/understanding-rest-architecture-gabriel-gitonga/
- REST was originally coined by Roy Fielding, who was also the inventor of the HTTP protocol.
- A REST API is an intermediary Application Programming Interface that enables two applications to communicate with each other over HTTP, much like how servers communicate to browsers.
- The REST architectural style has quickly become very popular over the world for designing and architecting applications that can communicate.
- The need for REST APIs increased a lot with the drastic increase of mobile devices. It became logical to build REST APIs and let the web and mobile clients consume the API instead of developing separate applications.
- SOAP(Simple Object Access Protocol) is another web service protocol that has been undertaken by REST
- SOAP exposes components of application logic as a service rather than data.
- SOAP only exchanges data over XML and REST produces the ability to exchange data over a variety of data formats. These include JSON and XML based on the configuration of the server
- SOAP is preferred when robust security is essential as it provides support for web services security(WS-Security), which is a specification defining how security measures are implemented in web services to protect them from external attacks.
- Another advantage of SOAP over REST is its built-in retry logic to compensate for failed requests, unlike REST in which the client has to handle the failed requests by retrying.