day_dreamer
day_dreamer

Reputation: 834

Difference between web services and web application

Lets have an example scenario:

Client opens a web site and finds the sum of two numbers which he enters from the textboxes.Then clicks on the ADD button.Two parameters are HTTP GET'ed to server where PHP code is written to add the numbers and result is echo'ed.

Based on this scenario could anybody explain the difference between Web services and application?

Upvotes: 37

Views: 55639

Answers (8)

Ajith Kumar V
Ajith Kumar V

Reputation: 1

Web service is for application consumption , invoked through web application To communicate with webservice data should be sent as SOAP message or as REST i.e XML over HTTP

Most of the times web service is not part of application because to facilitate the use by other web applications and it is not for direct consumption to end users

Web application is for human consumption invoked directly by GUI which may or may not use web service for giving response

Upvotes: 0

dmv
dmv

Reputation: 175

Lets take an example of Google search. We can use Google search in two ways. First, we can visit http://www.google.com and put out query for search. Google the returns the result. Second, we can integrate Google Search in our websites with custom search API.

In first case Google Search is acting as web application while in second example it is acting as web service.

Here we can point out few differences,

  1. User interacts with web application while machine interacts with web service.
  2. To access web application, one must visit application. While web service can be access from anywhere (from any application which integrated it). We don't need to visit the service explicitly.

Upvotes: 7

Yasir Ali
Yasir Ali

Reputation: 86

There is little difference between web application and web services. Web Application: In web application when user request any data then the server embeds the response into some HTML and forward it to the user and on browser the HTML is rendered. While in web services it's done differently that when some user requests for some data then the server returns it a json or XML array of objects and the data can be displayed by anyway the web designers wants.
Thanks Hope it resolves the matter.

Upvotes: 3

Dotnet bug
Dotnet bug

Reputation: 91

To add 2 no.s we write a web service, to subtract we write a diffrent web service, however calculator is an web application that uses add,subtract and many other webservices in combine.

Upvotes: 9

GenericJon
GenericJon

Reputation: 8986

A person drives a car. That car could be powered by an internal combustion engine, electric motor, or nuclear reactor. The power source doesn't matter to the driver though, as all they need to see are the controls and the road ahead.

The application is the car. Web services are the nuclear reactor.

Upvotes: 23

Habib
Habib

Reputation: 223282

In your case if you have User Interface for providing two numbers and then getting the result, it should be called a web application. But if you have an API exposed to receive two numbers and return result over http , then it should be called a web service.
At low level, both Web application and web service are kind of same thing. But the main point is that web services are for machine/program to machine/program communication whereas Web application is for Users.

Upvotes: 58

Simon McLoughlin
Simon McLoughlin

Reputation: 8465

A webservice is equivalent to a method in java that has a web wrapper around it. It lives on the server and it can be sent data / queried etc. and may or may not return a result. It does not have any front end it can only be accessed via http get, put, delete etc.

A web Application is a fully functional piece of software that lives on a sever that is designed to help people achieve a task. This would have a front end that would allow users to interact with it / enter data etc.

A web application could use multiple webservices to achieve its goal / end result

Upvotes: 5

Marek Dzikiewicz
Marek Dzikiewicz

Reputation: 2884

I'd say that web applications are intended for users and web services are intended for other applications. That's the most important difference. Web applications usually present data in HTML which looks nice to the user and web services usually present data in XML which easy to parse by other applications.

Upvotes: 26

Related Questions