REST 的用例

发布于 2024-11-28 10:52:36 字数 167 浏览 1 评论 0原文

REST 甚至是为 SaaS 使用而设计的吗?有这方面的例子吗?是的

,REST 可以让机器相互通信,等等。 如果没有以用户为中心的现实软件在用户命令机器与另一台机器通信时使用它,那么它有什么用呢?

如果是这样的话,REST 只用于 API 且仅用于 Web 服务,那么它还有什么魅力呢?

Is REST even designed to be used by a SaaS? Are there any examples of this? What's all the jazz about it whilst it's not even being used widely

Yes, REST is there for machines to communicate with each other and bla bla and bla.
What's the use of it is no user-centric real-life software uses it where user commands the machine to communicate with another machine?

If this is the case, in which REST is there for APIs and SOLELY and ONLY web-services, what's all the jazz about it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅笑轻吟梦一曲 2024-12-05 10:52:36

如果您仔细查看您刚刚提出问题的网站,您可能会注意到它积极使用 REST。

我不确定我是否正确理解了您的问题(可能是我或您的英语不够),但是如果您查看现代网站,您可能会注意到大多数网站中用户与 JavaScript 交互(一台机器),JavaScript 与服务器交互(另一台机器)。

我想 REST 被认为是个好主意,因为它定义简单、实现简单,而且一旦习惯了它,就可以以类似的方式与任何服务交互。

如果您的问题涉及其他问题,请接受我的歉意。

If you look closer at the site in which you have just placed your question, you may notice it uses REST actively.

I am not sure whether I understand your question properly (it may be that either my, or your English is insufficient), but if you look at the modern sites, you may notice that in most of them the user interacts with JavaScript (one machine), which interacts with the server (another machine).

I guess that REST is considered so good idea, because it is simple to define, simple to implement, and once you get used to it, you can interact with any service in similar manner.

If your question is about something different, accept my apologies.

坠似风落 2024-12-05 10:52:36

首先:REST 和 WebServices 并不完全相同,尽管它们大多(滥用)作为同义词使用。

REST 旨在在两台机器之间交换纯数据,而 WebServices 则提供完整的服务。所以,回答你的主题(这似乎与你对我的解释不太相符……):不,REST 并不是设计用于 SaaS 或作为 Web 服务使用的,但它很容易实现。

“[...]现实生活中没有以用户为中心的软件使用它[...]”

您是说,现实生活软件中没有使用两台机器之间的数据交换吗?即使在浏览器中打开一个页面也包含大量此类通信。或者您的电子邮件客户端偶尔检查一下电子邮件。

REST 和 WebServices 只是提供标准化接口,用于从另一台机器请求服务或数据/信息。

我必须承认,你对这个问题的表述对我来说不太清楚,所以我希望我的回答能以某种方式涵盖它。

At first: REST and WebServices are not quite the same things, although they're mostly (ab)used synonymously.

REST was designed to interchange pure data between 2 machines, while WebServices provide a whole service. So, answering your topic (which doesn't quite seem to to match your explaination for me...): No, REST was not designed to be used by SaaS or as a WebService, but it's easily possible.

"[...]no user-centric real-life software uses it[...]"

Are you saying, that data interchange between 2 machines is not being used in real-life software? Even opening a page in your browser contains a lot of communication of that kind. Or you eMail-client checking for emails once in a while.

REST and WebServices simply provide standardized interfaces for requesting a service or data/information from another machine.

I must confess, your formulation of the question is not quite clear to me, so I hope my answer covers it in some way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文