Difference between web services and web applicatio

2019-03-08 03:33发布

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?

9条回答
做个烂人
2楼-- · 2019-03-08 04:15

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.

查看更多
不美不萌又怎样
3楼-- · 2019-03-08 04:15

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.
查看更多
劫难
4楼-- · 2019-03-08 04:17

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.

查看更多
登录 后发表回答