REST API - Team Cambodia
An API (Application Programming Interface) is an application program that provides the connection between software applications and computers as well.
Imagine you are at a restaurant, the kitchen would be the server while the waiter would be an API who takes your orders as the customer, the client, to the cooks in the kitchen. The API in this example behaved as the connection between the server and the client and demonstrates its use for communicating between software applications.
A REST API (Representational State Transfer) is a simplistic and standardized service that is flexible to the client's needs for an API. It is mainly used for web services that are loosely connected through HTTP (Hypertext Transfer Protocol), a communication application for web browsers. As it follows protocols,
However, the REST API is not the only option available to use. Therefore, in order to make sure that the REST API can suit your needs as the client, there are six key constraints that you can review.
This constraints requires that the server and the client are separate from each other and that they need to update themselves on their own.
Cache is data stored on computers or browsers that makes user experience more efficient. For example, if you log into YouTube for the first time on your browser, it would ask you to log into your account. But say you log in again on the same browser, you would probably already be logged into your account. Cache is saved data that helps with user experience. Cache is important with REST API because REST API is more efficient because it uses cached data that way the main responsibility for REST is to only communicate between server and client, and not having to worried about already saved data only used by users.
A Uniform Interface defines the interface between the client and the server so that they can evolve separately from each other. It decouples the applications which simplifies the architecture itself.
REST API uses layer in the server that way the code is more organized. There can be different layers that involve security and user interface that are there to help organize data for the server, but for the client, these layers are invisible and all work together in the application/project.
REST API has the ability to send code from server to client that way updates can be added to websites and new features can be extended easily and efficiently through the server.