Monday 24 February 2014

Insight into Web Services for beginners

There have been a lot of questions I have been asking myself ever since I started studying computers in my undergrad. I got answers to some of them pretty early while some lingered on in my mind. Fortunately, over the last two years, I have slowly started uncovering answers to more of them.

What is a web service?
This is a pretty interesting question, actually. Now, looking at the two words in isolation, "web" and "service"; one would most likely understand that as a service offered over the web. Well! Yes, but not quite complete and convincing! This is with due consideration to the buzz around the terms when you naively start reading tech posts and keep wondering all along as to what justified the writer's extreme excitement and optimism while talking about something that sounds as trivial as a "web service".

That surely made me understand that there was a void in my understanding of "web service" and it surely is something much more than a service offered over the web. Back then, about 4 years back, I happened to ask my professor about the same thing and I could see that even this was not really helping me look at the thing from a wider perspective and attain that big picture I was looking for.

This morning, I happened to stumble upon this fine post, http://www.dummies.com/how-to/content/getting-a-look-at-web-services.html.

As it suggests, a service offered over the web that may be freely used by another application is called a web service. Sometimes, you may want to use a particular service exported by another service in a specific component of your application. Imagine, you would like to provide a search facility in your website and would like to incorporate the Google Search toolbox for the same reason. How the Google search engine works is of no concern to you and all you care about is that the Google Search toolbox accomplishes its job. Now, the search service provided by Google is an example of web service that is freely exported by Google and may be imported by anybody for use in his/her application.

In case you are a web programmer, you may be familiar with REST and SOAP calls. Typically, the web service is queried by the importer application using the REST or SOAP calls and the response of the web service called service response is rendered and shown to the user. These days, a format such as JSON (JavaScript Object Notation) is used to return the service response and this is rendered by a view-level language such as JSP. For those familiar with AJAX, it is a robust framework and technique that may be used to make the web service call and wait on its response.


No comments:

Post a Comment