Main Differences between SOAP and REST

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Main Differences between SOAP and REST

Post 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?
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Main Differences between SOAP and REST

Post 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.
The indelible lord of tl;dr
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Main Differences between SOAP and REST

Post 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
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Verahta
Posts: 441
Joined: Wed Aug 24, 2011 1:50 am

Re: Main Differences between SOAP and REST

Post by Verahta »

From what I understand, REST is doing CRUD and such operations through the browser, like URIs that are CRUD.
"In order to understand recursion, one must first understand recursion".
Post Reply

Return to “Beginner Help and Support”