Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'd start with <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm" rel="nofollow noreferrer">chapter 5</a> of Roy Fielding's dissertation. There are a few basic principles:</p> <ul> <li>Resources: A resource could be typically something that you expose to the outside world as a part of your service. The emphasis is on identifying the resources (e.g: Book, UserList, CalculateDistance) </li> <li>URI: Give every resource an identifier (e.g: example.com/books/7654)</li> <li>Uniform interface: Use standard methods like GET, PUT. POST, DELETE, HEAD, OPTIONS</li> <li>Representations: A resource can have multiple representations. For example, a GET on a book can return a PDF of that book's content, a HTML of the content and for that matter even a GIF with the book cover and so on. A representation is essentially a collection of all the data and markup.</li> <li>Hypermedia: This one, in my opinion, is a very important principle. Implementation of this principle takes your application far ahead of the regular CRUD-like definitions the REST-style is boxed into. HATEOAS is the acronym which stands for Hypermedia as the engine of application state. When you click on a link or submit a form you are changing the state of the application, that's happening via hyperlinks (or hypermedia). There is very little coupling between a server and a client. A client navigates through the application via the links provided by the server. (there is a lot of discussion in the blogosphere on this priniciple ...) [Also look at <a href="http://restfulie.caelumobjects.com/" rel="nofollow noreferrer">Restfulie</a>]</li> </ul> <p>I have recently <a href="https://stackoverflow.com/questions/2840275/whats-the-best-source-for-learning-how-to-create-restful-apis-in-java/2842069#2842069">answered a question</a> on good resources to learn REST, could be helpful.</p> <p>I'm not familiar with Rails, so not addressing that part of the question.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload