简体   繁体   English

Windows Form客户端中的面向服务的应用程序?

[英]Service Oriented Application in Windows Form client?

What could be the best way to create a server sided program on windows? 在Windows上创建服务器端程序的最佳方法是什么? The client will be a windows form application. 客户端将是Windows窗体应用程序。 Is there any problem with speeds on the client because of the load time. 由于加载时间的原因,客户端的速度是否存在任何问题。 And also for heavy requested method, is it possible for async? 而且对于繁重的请求方法,异步是否可能?

You'll probably want to take a look at WCF (Windows Communication Foundation). 您可能需要看一下WCF (Windows Communication Foundation)。 You can use it to create services and expose them as SOAP or using a few other standards, all being highly configurable. 您可以使用它来创建服务并将其公开为SOAP或使用其他一些标准,这些都是高度可配置的。 When your clients are all running on Windows you might want to expose the services using the net.tcp protocol. 当客户端都在Windows上运行时,您可能希望使用net.tcp协议公开服务。

WCF supports asynchronous methods. WCF支持异步方法。

"Is there any problem with speeds on the client because of the load time" is too vague to answer. “由于加载时间,客户端速度是否存在问题”太模糊了,无法回答。 Obviously there are a myriad of performance issues you'll need to consider and many parameters that matter (eg will you cluster? is the client data intensive? etc). 显然,您将需要考虑许多性能问题,并且需要考虑许多参数(例如,您是否要集群?客户端数据是否密集?等)。

Try this proof of concept code http://www.ienablemuch.com/2011/01/nhibernate-saves-your-whole-object.html I must admit that my code doesn't faithfully adhere to SOA design; 试试这个概念验证代码http://www.ienablemuch.com/2011/01/nhibernate-saves-your-whole-object.html我必须承认我的代码不忠实地遵循SOA设计; anyhow, you can use some of the principles how to retrieve POCOs(which is bandwidth-friendly) from WCF 无论如何,您可以使用一些原理来从WCF中检索POCO(带宽友好)

Others has a strong view about what constitutes a real service -oriented application, ie the domain entities are internal to a business and need not be exposed to business's clients(or for public consumption). 其他人对什么构成真正的面向服务的应用程序有很强的见解,即域实体是企业内部的,不需要暴露给企业的客户(或供公众使用)。 If you adhere faithfully to that tenet, you should use DTO (google this) and automapper (not related to fluent nhibernate's automapper) combo 如果您忠实地遵循该宗旨,则应使用DTO(在Google上搜索)和automapper (与流利的nhibernate的automapper无关)组合

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM