My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com









Thursday, May 10, 2018

Nine Planetary Differences between SOAP and REST APIs

Here is what I technically feel the major difference between  SOAP and REST. To begin with, SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer.

Like 9 planets of our Solar system, I list down following 9 major differences that will completely settle down the discussion. So here is what I call, The Nine Planetary Differences Between SOAP and REST:

1) The first of all is that SOAP is a protocol while REST is an architectural style. So, this is a monumental difference in itself.

2) Next is to remember that SOAP can not use REST as it is a protocol. On the other hand, the REST architecture can use SOAP web services because it is a concept and hence it can use any protocol like HTTP, SOAP. Generally, it's HTTP.

3) Other important difference is  that SOAP permits XML data format only while REST permits different data format such as Text, HTML, JSON, XML etc.

4) Its important to note that SOAP uses services interfaces to expose the business logic. REST, on opposite, uses the URI to expose business logic.

5) In Java, JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services.

6) Next difference is related to the standards followed by each. SOAP defines standards to be strictly followed but the REST architecture does not define too much standards.

7) SOAP requires more bandwidth and resources. REST requires less bandwidth and resource than SOAP. Hence, RESTful APIs shall be bit faster. But your choice of what should be chosen in your application depends more on your architectural needs.

8) Any discussion shall be incomplete without talking about the security. So, let's remember that SOAP defines its own security. RESTful web services inherits security measures from the underlying transport mechanism.

9) Last, but not the least, SOAP is less preferred than REST. RESTful APIs are becoming more popular. However, there is no near future where one can totally surpass the other. Both are useful depending upon the needs of the software web application or services you are building.

Cheers!

*PS: don't crib that solar system now has only eight planets. For such cribbing souls, consider the ninth difference above as striked off. After all, it's just a consequence of the eight differences above. Ahem!

No comments:

Post a Comment