Mastering REST Architecture — REST Architecture Details

REST — Representational State Transfer

https://cdn-images-1.medium.com/max/782/1*EbBD6IXvf3o-YegUvRB_IA.jpeg
REST is a simple way to organize interactions between independent systems.

HTTP — HyperText Transfer Protocol

We use HTTP protocol thousands of times in our daily life!
HTTP requests example

Benefits of using REST Architecture

  • RESTful as lightweight Web Services: The RESTful architecture was a reaction to the more heavy-weight SOAP-based standards. In REST web services, the emphasis is on simple point-to-point communication over HTTP using plain XML. In addition, RESTful permits many different data formats whereas SOAP only permits XML.
  • The simplicity of RESTful: The RESTful architecture is much simpler to develop than SOAP. One of the main reasons for REST popularity is the simplicity and ease of use, as it does an extension of native Web technologies such as HTTP.
  • RESTful architecture is closer in design to the Web: RESTful is the architectural style of the web itself, so the developer with knowledge in web architecture will naturally develop in the RESTful architecture.
  • Scalability: As RESTful forbids conversational state, which means we can scale very wide by adding additional server nodes behind a load balancer.
  • Expose APIs as HTTP Services: When developers need the universal presence with minimum efforts, given the fact that RESTful APIs are exposed as HTTP Services, which is virtually present on almost all the platforms.

Architectural Constraints

  • Interface / Uniform Contract: Once a developer becomes familiar with one of your API, he should be able to follow the similar approach for other APIs.
  • Client-Server: Servers and clients may also be replaced and developed independently, as long as the interface between them is not altered.
  • Stateless: No client context shall be stored on the server between requests. The client is responsible for managing the state of the application.
  • Cache: Well-managed caching partially or completely eliminates some client-server interactions, further improving scalability and performance.
  • Layered System
  • Code-On-Demand (optional)

Conclusion

  • REST is an architectural pattern which is based on HTTP and uses HTTP requests, responses, verbs and status codes to communicate.
  • The fact that REST services use HTTP means they can be consumed by almost any ‘online’ device or application (including IoT devices such as toasters, cars, pedometers etc) — no proprietary knowledge of the API is required! This is freaking awesome!!!

--

--

--

I am a big fan of Real Madrid CF and I love computer science!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Android Firebase Phone Authentication

Hello World?

How Singapore helped a GoBear software developer become MacGyver

Journey into GSoC — Part 6

How Bootstrap can make your life easy?

Tech Conference Diaries: Day 2 of SRECon 2017

CSS Basic Tips For Website Owners

Integrating Ansible with Jenkins in a CI/CD process

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmet Özlü

Ahmet Özlü

I am a big fan of Real Madrid CF and I love computer science!

More from Medium

Postgres: FETCH vs limit

Running Multiple Requests with Async/Await and Promise.all

What is JWT. How to implement JWT based authentication in NodeJs?

How to implement JWT based authentication in NodeJs

SE3050 -Application Frameworks Blog — 03