SOAP REST SERVLET What is the difference?

This is more of a psychological question I think. What is psychological about this? These 3 things together represent something very broad, so broad it may not even share a name. Phew.. differences between boys and girls. Between cat and dog. Pencil and pen. At least those things are close. Asking SOAP vs REST vs SERVLET is like asking 'bat' vs 'bat shit crazy'.
So let's take them one by one, then we shall find out the underlying relationship.
SOAP: Soap is a construct. The construct demands you to use the Internet in a particular way to achieve your job at hand. It suggests that you send human readable data like XMLs through the Internet using mainly HTTP and SMTP protocols. So if you want to make a blog application. You will send the blog posts as XMLs to your browser which shall be equipped with a JavaScript file to understand and make sense of this fury of information. Coming in on the HTTP and SMTP protocol in extensive human readable formats like XML. Is it the best, did it have advantages, does it fall short somewhere, is there something better, do I have to follow SOAP, was SOAP popularized when machines needed more information that they need today to run in a synchronized way over the Internet, ..... what we can be sure of is SOAP has something to do with using the Internet in tandem with our applications.
Let's look at REST through a story. Roy Fielding was doing his phD when he was struck with this idea that we are not using the Internet in the right way. He argued that we are sending lot of information over the Internet to our devices which can be avoided. How can it be avoided? Had no one thought of it before. I think its all about practicality. Primitive devices which ran over the Internet didn't have lot of memory or the good processing speed to contain and manage lot of information. But as time progresses these problems are now being tackled with. This means that now I can put lot of data on my local system and only get the trigger to start things at my end. This philosophy of architecture is what he called REST then.
Servlet is an object as in object oriented programming construct which gives us methods to make get post calls over the HTTP protocol and customize to hear such calls continuously and send appropriate responses. In a way its under both SOAP or REST.

Comments

Popular posts from this blog

Using cookies with HttpURLConnection

SPARQL

ffmpeg for Google Speech API