WPF使用WCF与ServiceStack [英] WPF using WCF vs ServiceStack

查看:124
本文介绍了WPF使用WCF与ServiceStack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,

我需要使用WPF客户端构建面向服务的应用程序。

I need to build a service oriented application with WPF client.

我使用了很多WCF谈论服务架构。然后我由某人来检查ServiceStack.net开源框架。

I have use a lot WCF when talking about services architecture. Then I come up by someone to check the ServiceStack.net open source framework.

你们中是否有人有这方面的经验并指导我哪一个最好用点来避免servicestack与WCF比较?

Does anyone of you have experience on it and guide me on which one is best to use of point to avoid in servicestack compare to WCF ?

通常在企业场景的生产环境中,由于缺乏支持和更新,我过去常常避免使用开源框架。

Usually in a production environment for enterprise scenario I used to avoid open source framework due to lack of support and update.

有分享的经验吗?

问候

推荐答案

嗨wakefun,

Hi wakefun,

答案基于一篇文章:

WCF:

"基本上,WCF是一个允许你构建的服务层可以使用各种通信机制进行通信的应用程序。有了它,您可以使用Peer to Peer,命名管道,Web服务等进行通信。



您无法比较它们,因为WCF是构建可互操作的框架应用。如果您愿意,可以将其视为SOA推动者。这是什么意思?
$


好​​吧,WCF符合ABC的要求,其中A是你要与之通信的服务的地址,B代表绑定和C代表合同。这很重要,因为可以更改绑定而无需
更改代码。合同更加强大,因为它迫使合同与实施分离。这意味着合同是在一个接口中定义的,并且有一个具体的实现,它由消费者
使用相同的合同理念绑定。数据模型被抽象出来。当我们需要与其他通信技术进行通信时,"



"应该使用WCF(例如,Peer to Peer,命名管道)而不是Web服务"

"Basically, WCF is a service layer that allows you to build applications that can communicate using a variety of communication mechanisms. With it, you can communicate using Peer to Peer, Named Pipes, Web Services and so on.

You can’t compare them because WCF is a framework for building interoperable applications. If you like, you can think of it as a SOA enabler. What does this mean?

Well, WCF conforms to something known as ABC, where A is the address of the service that you want to communicate with, B stands for the binding and C stands for the contract. This is important because it is possible to change the binding without necessarily changing the code. The contract is much more powerful because it forces the separation of the contract from the implementation. This means that the contract is defined in an interface, and there is a concrete implementation which is bound to by the consumer using the same idea of the contract. The datamodel is abstracted out."

"should use WCF when we need to communicate with other communication technologies (e,.g. Peer to Peer, Named Pipes) rather than Web Service"

ServiceStack:

ServiceStack:

ServiceStack是一个简单,快速,多功能,高效的全功能Web和Web服务框架它经过精心设计,旨在通过基于消息的设计降低人为复杂性并推广远程服务最佳实践,允许
进行最大程度的重复使用,可以利用集成的服务网关来创建松散耦合的模块化服务架构。 ServiceStack Services可通过一系列内置快速数据格式(包括JSON,XML,CSV,JSV,ProtoBuf,Wire
和MsgPack)以及用于SOAP端点的XSD / WSDL和Rabbit MQ,Redis MQ来使用,Azure Service Bus和Amazon SQS MQ主机。



它的设计和简洁性重点提供了无与伦比的生产力套件,无需代码即可以声明方式启用,从而创建完全可查询的Web API只有一个带有自动查询的Typed Request DTO,支持每个主要的RDBMS到
内置的自动批量请求支持,或者通过插件轻松地为所有现有服务启用丰富的HTTP缓存和加密消息。



您的同一服务还可以作为ServiceStack的Smart Razor Views中的控制器,减少了为Web和单页应用程序以及能够提供的富桌面和移动客户端提供服务的工作量使用ServiceStack的
实时S即时交互式体验erver Events。



ServiceStack服务还可以最大限度地提高消费者的工作效率,提供即时端到端类型的API,无需代码生成,从而为开发.NET提供最高效的开发体验到.NET Web服务。

ServiceStack is a simple, fast, versatile and highly-productive full-featured Web and Web Services Framework that’s thoughtfully-architected to reduce artificial complexity and promote remote services best-practices with a message-based design that allows for maximum re-use that can leverage an integrated Service Gateway for the creation of loosely-coupled Modularized Service Architectures. ServiceStack Services are consumable via an array of built-in fast data formats (inc. JSON, XML, CSV, JSV, ProtoBuf, Wire and MsgPack) as well as XSD/WSDL for SOAP endpoints and Rabbit MQ, Redis MQ, Azure Service Bus and Amazon SQS MQ hosts.

Its design and simplicity focus offers an unparalleled suite of productivity features that can be declaratively enabled without code, from creating fully queryable Web API’s with just a single Typed Request DTO with Auto Query supporting every major RDBMS to the built-in support for Auto Batched Requests or effortlessly enabling rich HTTP Caching and Encrypted Messaging for all your existing services via Plugins.

Your same Services also serve as the Controller in ServiceStack’s Smart Razor Views reducing the effort to serve both Web and Single Page Apps as well as Rich Desktop and Mobile Clients that are able to deliver instant interactive experiences using ServiceStack’s real-time Server Events.

ServiceStack Services also maximize productivity for consumers providing an instant end-to-end typed API without code-gen enabling the most productive development experience for developing .NET to .NET Web Services.

最好的问候,

Cherry


这篇关于WPF使用WCF与ServiceStack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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