Web Service vs Web Application

Kamal picture Kamal · Feb 2, 2012 · Viewed 65.5k times · Source

I know this is an old question and must have been answered hundred times already, but I am not able to find a satisfactory response as yet.

I am creating an application which will be used by other applications (mobile/ web) to fetch the data. Now I have 2 options:

  1. Create my application as a simple web application.
  2. Create a web service.

A web service looks more sophisticated where any client will provide the data in a specified format (SOAP/ REST) and my app will parse the request and return the data asked by client. How the data will be used is not my app's problem.

My question is that same can be achieved by a simple web app accepting the request in XML format and responding with an XML response. Gut feeling is that a web service will be a better way to go for this kind of service where we are not sure who all will be using it. But are there any specific advantages of using a web service over a simple web app?

Answer

Jeewes picture Jeewes · Oct 18, 2012

If we think the terminology, which I think is the main question here.

Web service refers to software, that serves data in any format (XML/JSON etc.) through some kind of web interface. That interface can be called API (Application Programming Interface). REST and SOAP are ways to design the API.

Application is the software that is using this API provided by the web service.

In the other words, web service is "server" and application is "client". Usually server serves machines and clients serve the user.

So in any way you choose to build your system, I would call the part that serves the data as "Web service" and the part that utilizes the data as "application" (or "web application" if such).

Sounds like in your case, you are building a web service that provides XML-formatted data for multiple applications. So my answer is: build the thing you are already building and call it web service.