Thursday, July 3, 2008

Why REST is called Representational State Transfer?

The extension of the acronym REST is Representational State Transfer. This extension was wisely chosen by Roy Fielding because it says a lot in just three words. Many of us might have wondered why REST is called so?

So here's a small explanation based on My Understanding

The definition goes back in 1990s when REST was being invented and Web was a very nascent creature.

The word Representational pertains to the representation of a resource. As we know a resource is quite centric to REST and is represented by a URI.

The word State Transfer comes from the concept of state machines. A well architected REST website is regarded as virtual state machine. Using links to move from one page (resource) to another is regarded as state transitions.

e.g. When the client is accessing page 1 of REST website through URI 1 he is considered in State 1. When he moves to linked page 2 which contains URI 2 on that website, he's considered transferred from State 1 to State 2.

That's how all this philosophy comes through. After all Roy Fielding submitted this masterpiece in his PhD Dissertation in 2000.

No comments: