The Wiki puts it aptly: “Manipulate resources over a network through hypertext representations transferred over messages between client and server“.
Oh boy, Jargons; better read on…
REST is this magic set of principles visualised by Roy Fielding and team in 2000 for network/web based applications, and can be applied if you are building a client-server application.
It simply points out that a Server does not need to return its complete database in every request, it can just return a representation (like a message in the form of HTML, XML or JSON) of the database record requested.
Once the client gets the message (or representation) back, it has enough information to read/digest/modify or delete the resource (database entry) on the server. This state representation of the database entry will have its information contained within the http body content, query-string parameters, request response headers and error codes of HTTP message.
You can already see the acronym (Representational State Transfer) shaping up.
Now the protocol over which this request and response message is transferred is our good old HTTP, using its powerful GET/POST/PUT/DELETE operations to KEEP LIFE SIMPLE!
Sounds okay, but why the Popularity:
1) Because any resource on your server (maybe a document, file, database entry or an image) or even this page you are reading on my server, can simply be accessed/managed/manipulated by a simple HTTP request-response model. How about that!
2) Resources on your server can only expose what needs to be sent back to user and hide the implementation complexity resulting in loose coupling between server and clients. So the exchange is secure and any type client can access your content.
3) Text based transfer of information using a uniform addressing protocol results in large data transfer and easy readability for devs and readers alike.
Feeling the power of REST yet? And how your server can be REST powered or better called RESTful?
If you are with me, turn over …