RESTful routes
Here is a good cheatsheet to take for anyone who is a beginner and its trying to learn about routes and what is going on.
Here are some of my old notes:
Instead of relying exclusively on the URL to indicate what webpage you want to go to, it’s a combination of VERB + URL. That way, the same URL, when used with a different verb (one of GET, PUT, POST, DELETE), will get you to a different page. This makes for cleaner, shorter URLs, and is particularly adapted to CRUD applications, which most web apps are.
One big part of the whole restful thing is that you should use the different HTTP methods to represent different actions(GET, POST, PUT, DELETE).
For example in Rails if you were to send a HTTP Delete
to /users/[id]
it would signify that you want to delete that user. HTTP Get
would retrieve an appropriate representation of the user. HTTP Put
can update or create a user. and HTTP Post will be use in cases such as input in a form for example.