是“WCF 数据服务”吗?朝着正确的方向前进吗?

发布于 2024-08-15 03:44:33 字数 191 浏览 5 评论 0原文

我真的很喜欢“WCF 数据服务”的想法,但它在现实生活场景中如何工作? WCF 数据服务为客户端提供了一种 CRUD 数据的好方法。然而,您可以传递和返回的内容非常有限。因此,最终所有业务逻辑都写在客户端。对于只需要数据库后端的小型应用程序来说可能没问题。您不希望在严肃的企业应用程序中,您的客户端变得太大,并且如果您的业务逻辑是某种专有技术,那么它可以很容易地拆卸。

I really like the idea of "WCF Data Services" but how does it work in a real life scenario? WCF Data Services provide just a nice way for the client to CRUD the data. However it's very limited in what you can pass and get back. So one ends up having all the business logic written on a client side. It's probably ok for small applications who just need a database back-end. You don't want that in serious enterprise applications, your client side will grow too large and if your business logic is some kind of know-how it can be easily disassembled.

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

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

发布评论

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

评论(2

岁月如刀 2024-08-22 03:44:33

不要误以为 SOAP 适用于企业,而 REST 适用于糟糕的小型 Web 应用程序。很多人在 SOAP 框架上浪费了很多时间,包括我在内,这些框架给企业间通信带来的麻烦将达到数十亿美元。

REST 提供了一个机会,让我们只关心从服务传递的数据以及用于对服务进行操作的语义,其余的(请原谅双关语)由传输层机制处理。您想要加密的数据通道吗? HTTPs 就是为此而存在的。需要认证吗? HTTP 上有很多框架已经支持这一点,而不是使用复杂的 WS-* 协议。您想要可靠的消息传递吗?您可以使用消息队列软件非常简单地设计它 - 我只见过一个 SOAP 框架可以很好地处理这个问题,而且当时它的互操作性还不是很好。

虽然我并不是认为 SOAP 是企业级的,但我想说的是,它并没有贬低基于 REST 的服务作为企业模块通信的绝佳方式。

我个人已经使用 REST 和 SOAP 集成了价值数百万美元的系统,目前更喜欢基于 REST 的服务,因为它们易于开发和第 3 方集成、理解、易于记录以及跨企业快速部署服务的能力。

Don't be misled that SOAP is for enterprise and REST is for sucky little side web apps. Many people have wasted a lot of time on SOAP frameworks, me included and the trouble that these frameworks cause for inter-enterprise communication would count into the Billions of dollars.

REST provides an opportunity to only care about the data being passed too and from services and the semantics used to operate against services, the rest (excuse the pun) is handled by transport level mechanisms. Do you want encrypted data channels? Well HTTPs is there for that. Do you need authentication? there are plenty of frameworks on HTTP that support this already rather than use complex WS-* protocols. Do you want Reliable Messaging? you can engineer it quite simply using message queue software - I have only ever seen one SOAP framework handle this well and it wasn't very interoperable at that point.

Whilst I am not discounting SOAP as enterprise-grade, all I am saying it don't discount REST based services as an excellent way for your enterprise modules to communicate.

I personally have integrated multi-million dollar systems using REST and SOAP and currently prefer REST based services for their ease of development and 3rd party integration, understanding, ease of documentation and their ability to rapidly deploy services across businesses.

中性美 2024-08-22 03:44:33

鉴于命名,我可以理解您的困惑... WCF 数据服务是基于 REST 的,这对于企业环境来说是出了名的差劲。但是,您可以拥有正常的基于 SOAP 的 WCF 服务,该服务对于企业来说可以正常工作。

I can understand your confusion given the naming... WCF Data Services are REST based which are notoriously poor for enterprise environments. Howvever, you can have normal SOAP based WCF services which work fine for the enterprise.

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