为什么REST是建筑风格而不是建筑风格? [英] Why REST is an Architectural Style and not an Architecture?

查看:52
本文介绍了为什么REST是建筑风格而不是建筑风格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RESTful应用程序,当我阅读有关REST的内容时,我发现REST是一种建筑风格而不是一种体系结构,但是我不理解其原因.感谢您的回答.

I am working in a RESTful application and when I was reading about REST, I found that REST is an Architectural Style and not an Architecture but I do not understand the reason. Thanks for your answer.

对不起,我的英语不是我的母语.

Sorry for my English, it is not my native language.

推荐答案

体系结构是规范性的,通常给出解决方案的蓝图,并定义核心构建基块.例如,客户端-服务器"体系结构定义了客户端,服务器以及这两个组件所扮演的角色.

An architecture is prescriptive, often giving blueprints for solutions, and defining the core building blocks. For instance, "client-server" architecture defines a client, a server, and the roles those two components play.

一种架构风格为思考解决方案提供了一个框架-在REST的情况下,可通过URL寻址的资源概念,用于处理这些资源的词汇表,无状态等.

An architectural style provides a framework for thinking about solutions - in the case of REST, the concept of resources addressable through a URL, a vocabulary for manipulating those resources, statelessness etc.

这很重要,因为可以很容易地回答这是一个客户端服务器体系结构"问题吗?是否有一个客户端,它是否连接到服务器,每个客户端都有明确的职责吗?这是RESTful解决方案"这个问题很难回答-它要求您查看该解决方案是否遵循REST的思维模型.

This is important, because the question "is this a client server architecture" can easily be answered - is there a client, does it connect to the server, are there clear responsibilities for each? The question "is this a RESTful solution" is much harder to answer - it requires you to see if the solution follows the mental model of REST.

这篇关于为什么REST是建筑风格而不是建筑风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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