Page 1 of 1

Main Differences between SOAP and REST

Posted: Tue Sep 23, 2014 9:05 pm
by vitinho444
Hey guys, one my journey through API's and web services i've encountered probably the most famous ones, SOAP and REST.

I've started out with SOAP, which PHP has a class already built to handle requests to wsdl links, and it all works smooth and great. But I've noticed that the web services with SOAP are not well maintained and REST is taking its place, so I was searching REST tutorials and guides and I found one that wasn't more than a file_get_contents/curl request that could handle POST, GET, PUT and DELETE requests and would send a HTTP Code and a body as a response.
My question is, is there all there is?

What are the key differences between the two, and is REST only a handler for the type of request and response?

Re: Main Differences between SOAP and REST

Posted: Tue Sep 23, 2014 11:43 pm
by Jackolantern
That is pretty much it. REST is simply a protocol, if you can even call it that, that takes advantage of the way HTTP was designed a long time ago. Someone looked at the HTTP verbs, and realized "Hey, you could pretty much make a whole application interface with these" and so they did just that. REST is taking over because it is so much more simple, and uses HTTP and the web natively with very little modification or other layers needed.

Re: Main Differences between SOAP and REST

Posted: Wed Sep 24, 2014 9:15 am
by vitinho444
Wow I know REST :D

That's why I asked, because it looked very simple. SOAP wasn't that hard either, I guess its due to the HTTP codes that makes it easier, but SOAP was just a matter of creating a instance of the Soap class giving it the wsdl and do the request and get the response.
But Yeah no problemo! :D

Thanks Jacko

Re: Main Differences between SOAP and REST

Posted: Thu Sep 25, 2014 4:55 am
by Verahta
From what I understand, REST is doing CRUD and such operations through the browser, like URIs that are CRUD.