Web 服务和 Web 应用程序之间的区别 [英] Difference between web services and web application

查看:40
本文介绍了Web 服务和 Web 应用程序之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们举一个例子:

客户端打开一个网站,找到他从文本框中输入的两个数字的总和.然后点击添加按钮.两个参数是 HTTP GET 到服务器,在那里编写 PHP 代码以添加数字,结果是回声.

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.

基于这种情况,有人可以解释 Web 服务和应用程序之间的区别吗?

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

推荐答案

在您的情况下,如果您有提供两个数字然后获取结果的用户界面,则应将其称为 Web 应用程序.但是,如果您有一个公开的 API 来接收两个数字并通过 http 返回结果,那么它应该被称为 Web 服务.
在底层,Web 应用程序和 Web 服务是一种相同的东西.但主要的一点是 Web 服务用于机器/程序到机器/程序的通信,而 Web 应用程序用于用户.

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.

这篇关于Web 服务和 Web 应用程序之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆