![]() I think these are the crucial points to understand what REST is about, and how it differs from SOAP: ![]() Additionally, a REST client can be extended by code-on-demand supplied by the server itself, the classical example being JavaScript code used to drive the interaction with another service on the client-side. In SOAP, the client needs previous knowledge on everything it will be using, or it won't even begin the interaction. A client is supposed to enter a REST service with zero knowledge of the API, except for the entry point and the media type. ![]() If done right, there's less coupling, and changes can be dealt with more gracefully. You don't violate the protocol standards by creating extra methods, you leverage on the standard methods and create the actions with them on your media type. It's a generic client that knows how to use a protocol and standardized methods, and an application has to fit inside that. You need constant updates following any change, but it's easier to ascertain if the contract is being followed.Ī REST client is more like a browser. There's a rigid contract between client and server, and everything is expected to break if either side changes anything. A SOAP client works like a custom desktop application, tightly coupled to the server. Pushing things a little and trying to establish a comparison, the main difference between SOAP and REST is the degree of coupling between client and server implementations. This is probably one of the sources of confusion around it, since people tend to call REST any HTTP API that isn't SOAP. ![]() SOAP and REST can't be compared directly, since the first is a protocol (or at least tries to be) and the second is an architectural style. Not only your question and the answer by reflect those, but most of the questions and answers related to the subject on Stack Overflow. Unfortunately, there are a lot of misinformation and misconceptions around REST. ![]()
0 Comments
Leave a Reply. |