O'Reilly logo

Rails Cookbook by Rob Orsini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. RESTful Development

Introduction

Contributed by: Ryan Daigle

Shortly before the first Rails conference, David Heinemeier Hansson began work on a profoundly new approach to designing and developing Rails applications. His keynote speech at that conference was titled “Resources on Rails.” The presentation introduced the idea of resource-oriented Rails development and a software architecture called Representational State Transfer, or REST.

REST is an architecture that was initially proposed by Roy Fielding in his PhD dissertation (http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm). It allows you to build full-featured and extensible web services and applications on top of a small set of core, foundational operations. These operations are the standard HTTP request methods (GET, POST, PUT, DELETE), of which you may only have experience with GET and POST. Web development has long ignored the full HTTP specification and has piled undue responsibility on the GET and POST methods, forcing them to shoulder the full load of requesting and sending data to and from dynamic web applications. But these request methods, these verbs, are the core of a very simple but expressive design methodology.

REST Is a Conversation

REST is about breaking down HTTP requests to a natural, human-language type structure where there are verbs and nouns. The verbs of the REST conversation are the aforementioned request methods, while the nouns are URIs, unique identifiers for some resource accessible ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required