Server and client are independent
With REST, there is no restriction or dependency between server and client. Both can be independent of each other. It's just the URL by which the client understands the service. The code for a web service on a server can be modified without caring about the clients that are associated with it and vice versa.
This kind of separation helps the client/server architecture to breathe freely without any hurdles. Therefore, designing the application and separating its core business logic becomes easy. What I mean by that is simple. Designing the app can be done using client-side technologies and the RESTful web service is invoked wherever there is a necessity for business-related operations in a database.
However, keeping both server and client modular and separate depends on one condition and that is the format of the messages they send and receive. Both of them should be aware of the message format to send and receive.
As the user interface is separated from the business-and data-storage-related operations, flexibility and scalability can be improved by simplifying the server components. Moreover, the separation allows each component to evolve independently.
REST endpoints are exposed by certain URLs. Different clients can connect using the URL, then perform the action intended and get the response back.
In this book, we will build a small e-commerce web service with minimal operations, where a user can use a cart and make orders. These operations will be exposed using endpoints. As we discussed, endpoints can be easily consumed from different types of clients including mobile apps, web apps, server-side code, and so on.