目前正在做一些考试,我正在努力学习一些概念.这些都在我的笔记中被提到过,但我不太明白它们是如何联系在一起的.据我所知:

SOA - a solution to make service consumers/providers communicate. (as far as I understand this is the umbrella term for everything else)

WSDL - A language that describes the provider service.

SOAP——服务用来发送消息的XML协议"包装器".与WSDL一起工作以提供参数?

睡觉--一种在功能上类似于SOAP但避免了xml的设计模式?(这个真的不太确定)

JSON-使用javascript的XML的替代方案?(这个也不太确定)

Looking around in the internet there doesn't seem to be a clear definition of what all of these are and how they interlink.

推荐答案

假设您正在开发一个Web应用程序,并且您决定将功能与应用程序的表示分离,因为它提供了更大的自由度.

You create an API and let others implement their own front-ends over it as well. What you just did here is implement an SOA methodology, i.e. using web-services.

Web服务使功能构建块可以通过标准访问 独立于平台和编程语言的互联网协议.

因此,您需要在后端(web服务)和前端(使用数据)之间设计一种交换机制,前者处理和生成有用的内容,后者可以是任何内容.(web、移动或桌面应用程序,或其他web服务).这里唯一的限制是前端和后端必须"讲"相同的"语言".


That's where SOAP and REST come in. They are standard ways you'd pick communicate with the web-service.

SOAP:

SOAP internally uses XML to send data back and forth. SOAP messages have rigid structure and the response XML then needs to be parsed. WSDL is a specification of what requests can be made, with which parameters, and what they will return. It is a complete specification of your API.

REST:

休息是一个设计概念.

万维网代表了系统的最大实现 符合睡觉建筑风格.

It isn't as rigid as SOAP. RESTful web-services use standard URIs and methods to make calls to the webservice. When you request a URI, it returns the representation of an object, that you can then perform operations upon (e.g. GET, PUT, POST, DELETE). You are not limited to picking XML to represent data, you could pick anything really (JSON included)

Flickr的REST API更进一步,还允许您返回图像.


JSONXML在功能上是等效的,是常见的 Select .还有一些基于RPC的框架,比如基于Protobufs的GRPC和Apache Thrift,可以用于API生产者和消费者之间的通信.web API最常用的格式是JSON,因为它在每种语言中都易于使用和解析.

Json相关问答推荐

我可以使用JQ来缩小数组中的json对象的范围吗?

与错误相关的未定义&Quot;不是有效的JSON

重构JOLT代码以获得预期输出

在这种情况下我如何实现 UnmarshalJSON 并且只为一个接口字段定义特殊行为?

jq 中的整个单词匹配

无法在Kotlin 中解析JSONObject

Oracle Apex - 将 JSON 对象分配给变量以返回

JQ 中的样本标准偏差

为什么在测试 RSPEC 时 JBuilder 不返回 JSON 中的响应正文

解析包含换行符的 JSON

如何将任意 json 对象发布到 webapi

SyntaxError:Object.parse(本机)AngularJS中的意外标记o

将 JSON 读取到 pandas 数据框 - ValueError:将 dicts 与非系列混合可能会导致排序不明确

如何使用 Jackson 重命名 JSON 序列化中的根键

Spring MVC:不反序列化 JSON 请求正文

如何使用 Jackson 注释从 HttpResponse 反序列化 JSON 对象?

将序列化表单的数据转换为 json 对象

有没有一种快速的方法可以在文本编辑器中将 JavaScript 对象转换为有效的 JSON?

JSON.stringify 向我的 Json 对象添加额外的 \ 和 "" 的问题

Java HashMap 与 JSONObject