9

Possible Duplicate:
What is REST (in simple English)

What does RESTful web applications mean?

A web service is a function that can be accessed by other programs over the web (Http). To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser. A web service is not targeted at humans but rather at other programs.

SOAP and REST are two ways of creating WebServices. Correct me if i am wrong?

What are other ways i can create a WebService?

What does it mean fully RESTful web Application?

0

2 Answers 2

3

Please refer to the excellent answers on StackOverflow to the question What exactly is RESTful programming?

Here's some of the major points:

  • To understand REST, you have to first understand HTTP. The HTTP protocol is oriented around verbs and resources. The two verbs in mainstream usage are GET and POST, however, the HTTP standard defines several other such as PUT and DELETE. These verbs are then applied to resources.

  • In a RESTful application you'll never modify data using a GET request. This is what PUT, POST and DELETE are for. Most web applications do this all the time, though, and are therefore not RESTful.

  • Also, the actual representation retrieved for a resource, returned by the HTTP response, is dependent on the HTTP Accept headers to control whether you want XML, HTTP, or even a Java Object representing the requested resource.

  • The above points are dealing with RESTful web applications, which is a specific implementation (over HTTP) of the more general REST architectural style, which was originated in a dissertation by Roy Fielding.

2
  • 1
    Please note the different between REST (an architectural style, that consists of a series of constraints) and RESTful web applications (a specific implementation based on HTTP). The points in this answer are mostly about the latter. For the former, I suggest reading Roy Fielding's dissertation, where the term originated. Jun 20, 2012 at 12:34
  • @AndréParamés thanks - I have updated the answer to include this important point. Jun 21, 2012 at 1:53
1

Yes, the REST design is first meant for services. But your web application is nothing else but offering such a service to your browser application. So if I design an application in a RESTful way, most likely within a MVC framework, my controlers are organized following REST principles.

As an example: I have a shopping cart. To this shopping cart I can add items, can edit or remove them. So I have a controller named CartItem, that implements the REST service and takes the requests from the browser. A 'fully' RESTful Application would have all it interactions organized as resources and RESTful requests. Even a static page has a controller that reacts to the show action.

Not the answer you're looking for? Browse other questions tagged or ask your own question.