什么是“网络服务"?用简单的英语? [英] What is a "web service" in plain English?

查看:30
本文介绍了什么是“网络服务"?用简单的英语?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在 SO、维基百科、Google 等网站上阅读有关网络服务"的内容,但我不太明白它们是什么.什么是简单的英语定义/描述?

I've been reading about "web services" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description?

如果我使用 PHP 制作一个简单的网站,比如说,在页面上打印一个随机整数……这是一个网络服务"吗?如果没有,为什么不呢?

If I make a simple website using PHP that just, say, prints a random integer to the page... is this a "web service"? If not, why not?

推荐答案

一个简单的定义:Web 服务是一种可以被其他程序通过 Web (HTTP) 访问的功能.

A simple definition: A web service is a function that can be accessed by other programs over the web (HTTP).

例如,当您在 PHP 中创建一个输出 HTML 的网站时,其目标是浏览器以及在浏览器中阅读页面的人.网络服务不是针对人类,而是针对其他程序.

For example, when you create a website in PHP that outputs HTML, its target is the browser and by extension the human reading the page in the browser. A web service is not targeted at humans but rather at other programs.

因此,如果生成随机整数的 PHP 站点以其他程序可能使用的格式输出整数,则它可能是 Web 服务.它可以是 XML 格式或其他格式,只要其他程序可以理解输出即可.

So your PHP site that generates a random integer could be a web service if it outputs the integer in a format that may be consumed by another program. It might be in an XML format or another format, as long as other programs can understand the output.

完整的定义显然更复杂,但您要求的是简单的英语.

The full definition is obviously more complex but you asked for plain English.

这篇关于什么是“网络服务"?用简单的英语?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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