Master ruby with us

RESTful architecture

Posted by firstruby on May 29, 2008

RESTful interface means clean URLs, less code, CRUD interface.


You might heard about HTTP verbs, GET, POST. In REST, they add 2 new verbs, i.e, PUT, DELETE.

There are 7 default actions, those are – index, show, new, create, edit, update, destroy

GET is used when you retrieve data from database. POST is used when you create new record in database. PUT is used when you are updating any existing record in database, and DELETE is used when you are destroying any record in database. Following table may clear the concept.

Action VERB

index                        GET

show                        GET

new                          GET

create                       POST

edit                          GET

update                      PUT

destroy                    DELETE


One Response to “RESTful architecture”

  1. Arvind said

    nice article ,thanks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: