Check out the latest posts form our blog - from posts about our work to thoughts about life and technology as a whole
There is a lot of buzz these days about REST APIs, newly born Javascript frameworks like Angular and Ember, Node.JS and so on.
As Node is a relatively new technology and other even younger frameworks like Ractive.js make their way, REST architecture is here for the last 15 years. 15 years are not so much, right? Having in mind the Internet hasn’t turned its 25th birthday yet, 15 is a big deal.
Don’t get me wrong, I’m not going to mess Node.JS with any client-side Javascript framework. I’m talking about REST out of any implementation context.
REST or Representational state transfer is designed together with the HTTP 1.1 [http://www.ietf.org/rfc/rfc2616.txt] protocol and even it lays deep in the roots of the Internet, we have violated it for so many years.
The idea behind the REST architecture is to provide a way of building a scalable and maintainable client-server communication layer. It relies on some constraints and when some service complies with them, we can say it is a RESTful one.
Some general features of the REST are:
Programming language or the actual data format does not have impact on the functionality.
Although the most common format is JSON, there can be used XML, ATOM or even HTML for data transfer.
The requests should be Stateless, so any request should contain all the data needed for its execution.
Standard HTTP methods (GET, PUT, POST, and DELETE) are used for describing the operation.
One of the main reasons why REST has not been used in the early years of HTTP 1.1 is its partial implementation in various browsers, but lately all major browsers have been supporting HTTP methods needed for implementing the REST architecture, so it is time to get in line and start using it.