PRISM 是 SOA 的一种形式吗?

发布于 2024-10-11 14:24:00 字数 28 浏览 1 评论 0原文

PRISM 是面向服务的架构的一种形式吗?

Is PRISM a form of Service Oriented Archetecture?

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

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

发布评论

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

评论(1

可可 2024-10-18 14:24:00

来自 Wikipedia

“面向服务的架构 (SOA) 是一组灵活的设计原则在计算中的系统开发和集成阶段使用基于 SOA 的系统将功能打包为一套可互操作的服务,这些服务可以在多个业务领域的多个独立系统中使用。”

(先发制人的尖锐评论:我知道,维基百科。有时,它只是作为资源使用的最简单的东西。)

我认为这里的关键区别是 SOA 意味着离散系统之间通过某种介质进行交互。这种交互不一定被定义,但隐含的假设是系统是独立的并使用通信机制来获取服务。

Prism作为一个框架,要求你不独立,即它不通过一些外部交互机制暴露它的服务。您不能使用 SOAP 或 XML 通过 IEventAggregator 订阅或接收事件。这不是 Prism 的目的:它用于构建应用程序,而这些应用程序可能是 SOA(也可能不是)。

话虽如此,它显然通过使用依赖注入容器来使用 SOA 固有的原则。事实上,在您的应用程序中,您可以通过容器请求 Prism 服务(IRegionManager、IEventAggregator 等),而无需实际担心自己构建服务,这意味着面向服务的设计。当然,您确实构建了服务 - 但它发生在引导程序的“幕后”。但您必须与 Prism 紧密耦合才能获得服务,而且您只能通过代码获得服务。不通过任何媒介。

(尽管如此,有些人已经考虑通过媒介公开这些服务,例如 PRISM 和 WCF - 它们表现得好吗?,其中 IEventAggregator 通过 WCF 公开)

From Wikipedia:

"Service-oriented architecture (SOA) is a flexible set of design principles used during the phases of systems development and integration in computing. A system based on a SOA will package functionality as a suite of interoperable services that can be used within multiple separate systems from several business domains."

(Preemptive snarky comment: I know, Wikipedia. Sometimes, its just the easiest thing to use as a resource.)

I think the key distinction here is that a SOA implies interaction between discrete systems over some medium. That interaction isn't necessarily defined, but the implicit assumption is that the systems are independent and use a communication mechanism to obtain services.

As a framework, Prism requires you to not be independent, i.e., it does not expose its services through some external interaction mechanism. You can't use SOAP or XML to subscribe or receive an event through IEventAggregator. That isn't Prism's purpose: it's used to build applications that may, in turn, be SOA (or not).

That being said, it obviously uses principles inherent in SOA through its usage of dependency injection containers. The fact that, in your application, you can ask for a Prism service (IRegionManager, IEventAggregator, etc.) through the container without actually worrying about the construction of the service yourself implies a service-oriented design. Of course, you do construct the service - but it happens "under the hood" in the bootstrapper. But you do have to be tightly coupled to Prism in order to get the service, and you're only going to get the service through code. Not over any medium.

(Although, there are people who have looked at exposing those services over mediums, such as PRISM and WCF - Do they play nice?, wherein IEventAggregator is exposed over WCF)

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