什么是面向服务的架构? [英] What is service-oriented architecture?

查看:29
本文介绍了什么是面向服务的架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是面向服务的架构?

What is service-oriented architecture?

推荐答案

SOA 是开发面向服务的应用程序的方式,而 WCF 是可用于开发面向服务的应用程序的技术.但是 SOA 为应用程序定义了严格的规则(称为 SOA 原则).如果您不遵循这些规则,您就是在构建服务,但这些服务不符合 SOA.

SOA is way to develop service oriented applications and WCF is technology which can be used to develop service oriented applications. BUT SOA defines strict rules (known as SOA tenets) for applications. If you don't follow these rules you are building services but these services do not conform to SOA.

WCF 允许您开发多种类型的服务.您可以开发符合或不符合 SOA 的可互操作的 SOAP 服务.您可以开发具有非互操作功能的纯 .NET 服务,也可以开发 REST 服务.

WCF allows you to develop plenty of types of services. You can develop interoperable SOAP services which conform to SOA or which doesn't. You can develop pure .NET services with non interoperable features and you can develop REST services.

此外,SOA 服务中的含义与 WCF 中的含义不同.在 WCF 中,服务是在端点上公开的功能的集合.在 SOA 中,服务可以是整个应用程序(一组类似 WCF 的服务)——小型和大型 SOA 之间的区别.

Moreover in SOA service can have different meaning than in WCF. In WCF service is collection of functionality exposed on endpoints. In SOA the service can be whole application (set of WCF like services) - difference between small and big SOA.

SOA 原则是:

  • 边界是明确的 - 服务不与其他服务共享任何东西(甚至数据库表和数据也不能共享)
  • 服务是自治的 - 每个服务都是独立的,可以单独部署和版本控制
  • 服务共享模式和契约,而不是类 - 服务在 WSDL 中描述,传输的数据在 XSD 中描述,编排(聚合)在 BPEL 中描述
  • 服务兼容性基于策略 - WSDL 包含 WS-Policies 来描述互操作性所需的配置

如您所见,尤其是在构建 WCF 服务时,前两条原则很容易被违反.

As you see especially first two tenets can be easily violated when building WCF service.

这篇关于什么是面向服务的架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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