Building RESTful Web Services with Spring 5(Second Edition)
上QQ阅读APP看书,第一时间看更新

A Few Basics

As the world has moved into the big data era, collecting and dealing with data alone has become the main part of most of our web applications, and web services, too, as web services deal only with data, not the other parts of the user experience, look, and feel. Even though user experience is very important for all web applications, web services play a major role in dealing with data by consuming services from the client side.

In the early days of web services, Simple Object Access Protocol (SOAP) was the default choice for all backend developers who dealt with web service consumption. SOAP was mainly used in HTTP and Simple Mail Transfer Protocol (SMTP) for message transmission across the same or different platforms. When there was no JavaScript Object Notation (JSON) format available for web services, XML used to be the only available format SOAP could use for the web service consumption.

However, in the JSON era, Representational State Transfer (REST) started dominating web service based applications, as it supports multiple formats, including JSON, XML, and other formats. REST is simpler than SOAP, and the REST standards are easy to implement and consume. Also, REST is lightweight as compared to SOAP.

In this chapter, we will cover the following topics:

  • REST—a basic understanding
  • Reactive programming and its basics, including the benefits of Reactive programming
  • Spring 5 basics with Reactive programming
  • A sample RESTful web service that will be used as a base for the rest of the book