Updating the statistics application
This time, the statistics application is going to work as a web service. The two main tasks that need to be performed are defining the API along with the endpoints and implementing the API. A third task that needs to be determined concerns data exchange between the application server and its clients. There exist many approaches regarding data exchange between the server and its clients. We are going to discuss the following four ways:
- Using plain text
- Using HTML
- Using JSON
- Using a hybrid approach that combines plain text and JSON data
As JSON is explored in Chapter 11, Working with REST APIs, and HTML might not be the best option for a service because you need to separate the data from the HTML tags and parse the data, we are going to use the first approach. Therefore, the service is going to work with plain text data. We begin by defining the API that supports the operation of the statistics application.
...