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?
Main Differences between SOAP and REST
- vitinho444
- Posts: 2825
- Joined: Mon Mar 21, 2011 4:54 pm
- Jackolantern
- Posts: 10893
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Main Differences between SOAP and REST
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
- vitinho444
- Posts: 2825
- Joined: Mon Mar 21, 2011 4:54 pm
Re: Main Differences between SOAP and REST
Wow I know REST
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!
Thanks Jacko
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!
Thanks Jacko
Re: Main Differences between SOAP and REST
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".