Vineet kaushik
Vineet kaushik

Reputation: 361

SOAP is a XML-based message protocol, while REST is an architectural style

while going through the differences between SOAP and REST there was onepoint that

SOAP is a XML-based message protocol, while REST is an architectural style

what I am not able to understand is that what does it mean by REST is an architectural style???

Please help on this.

THanks, Vineet

Upvotes: 1

Views: 1412

Answers (2)

Xargos
Xargos

Reputation: 643

This is actually quite a common issue, one that I had to face my self as well.

There are two Web Services architecture structures: Representational state transfer (REST) and Remote Procedure Call (RPC). The wikipedia definition of archtecure structure is:

"The term software architecture intuitively denotes the high level structures of a software system. It can be defined as the set of structures needed to reason about the software system, which comprise the software elements, the relations between them, and the properties of both elements and relations."

Its hard to further define what it means. You either get it or you don't.

The basic difference between them is that REST uses already available technologies that the web is built on, while RPC adds additional layer of abstraction to define communication. In general REST are simple, lightweight WS but without formal communication specification, while RPC is heavy, bit more complex but with formal communication specification.

Now, for examples of implementations (which are basically communication protocols) of those architectures:

RESTful - obviously uses REST architecture

SOAP - uses RPC architecture

Upvotes: 1

user2093576
user2093576

Reputation: 3092

Because it is based on two architectural styles 1. Layered, code-on-demand, client-cached-stateless server (itself a composition) 2. Uniform interface

The term software architecture denotes the set of practices used to select, define or design

In REST there is much more flexibility in choosing the mode of data transfer and also the way we implement it unlike SOAP where the data has to be sent in XML format only.

If we are using RESTful the mode of transfer of data can be JSON, XML, Simple Text etc.

Upvotes: 0

Related Questions