Introducing REST, API, JSON, and XML
Data presented to users can come from different sources. It can be hardcoded into an app (static), but that comes with limitations. To change hardcoded data, we have to publish an update to our app. Some data (such as currency exchange rates, the real-time availability of assets, and the current weather) cannot be hardcoded due to its nature (it’s dynamic). Other data may become outdated, such as the terms of use of an app.
In such cases, you usually fetch the relevant data from a server. One of the most common architectures for serving such data is the Representational State Transfer (REST) architecture.
REST and APIs
The REST architecture is defined by a set of six constraints: client-server architecture, statelessness, cacheability, a layered system, code on demand (optional), and a uniform interface.
To learn more about REST, visit https://packt.link/S01UB.
When applied to a web service application programming...