producted
producted

Reputation: 113

REST versus SOAP and versus simple website, etc

I'm starting in the web-services world and I have a few questions:

Upvotes: 6

Views: 357

Answers (3)

TTMAN
TTMAN

Reputation: 129

See the Richardson Maturity Model for an explanation on what a RESTful service is.

alt text

To reach level 3 one must satisfy the Hypermedia as the Engine of Application State. abrivated HATEOAS constraint (also called the Hypermedia constraint). This means that most services out there is not RESTful, but merly CRUD services... which is fine...

A good resource on REST is REST in Practice

The main difference between SOAP and REST is that REST services does not have a WSDL defining the "operations", thank god for that. Yet the data structures can be defined by a schema language such as Schematron, XSD for XML...

Upvotes: 6

Aurojit Panda
Aurojit Panda

Reputation: 909

  • REST returns structured XML or JSON data, you don't send back an entire webpage, which could be hard to interpret, and would be unnecessarily complicated.

  • You can parse XML or JSON data into an object in any language with a parser for this (including the .net languages). An object in this sense doesn't mean a full fledged .net object with a vtable etc.

  • SOAP overloads the POST data sent with an HTTP request, and hence instead of having many URLs to which you send individual requests, you just have one URL to which you post some XML data. In reality, the difference is mostly semantic.

Upvotes: 0

hvgotcodes
hvgotcodes

Reputation: 120138

REST stands for Representative State Transfer. It is built on the fact that the HTTP protocol is stateless, and specifies some methods like PUT/GET/POST etc. REST attaches semantics to those methods. For example, a GET means 'Read/Load'. PUT means 'save'. POST means 'update'. (I think I got that right...)

So REST is not a call to a URL, REST is a concept. You use REST by making calls to Urls. The difference between REST and a 'simple website' is the REST semantics. A PUT request means one thing, a GET request means another, etc.

RESTful webservices are language independent because the depend on the HTTP protocol; thats it. They don't depend on any language features, other than the ability to use the HTTP protocol.

Upvotes: 1

Related Questions