简体   繁体   English

Winform客户端和服务器的Web服务之间的通信

[英]Communication between winform client and server's web service

currently I'm an internee and about to join in a project in which I have to take responsible for implementing the server side part. 目前,我是一名实习生,即将加入一个项目,在该项目中,我必须负责实施服务器端部分。

The scenario: _There are many kiosks, each runs a winform application, this application read barcode from customer's card and then send the info to server. 场景:_有很多信息亭,每个信息亭运行一个winform应用程序,该应用程序从客户卡中读取条形码,然后将信息发送到服务器。 _The server has several web services, each service can process the info received from client and send back the result. _该服务器有多个Web服务,每个服务都可以处理从客户端收到的信息并发送回结果。 The server also has the ability to display logs/reports for the administrator to see. 服务器还具有显示日志/报告的功能,供管理员查看。

So how can I implement the communication between the client and server? 那么如何实现客户端与服务器之间的通信呢? I have researched a bit and see two solutions: .Net socket and WCF but don't know which one is better for this situation or is there any other better way? 我研究了一下,看到了两种解决方案:.Net套接字和WCF,但不知道哪种解决方案更适合这种情况,或者还有其他更好的方法吗? And the report display ability I can implement it just as a normal web application right? 报表显示功能我可以像普通的Web应用程序一样实现吗?

Also, I would love to receive links to tutorials similar to my problem. 另外,我很想收到与我的问题相似的教程的链接。

Sorry for my bad English and thanks a lot! 对不起,我的英语不好,谢谢!

except WCF providing 'Remote Procedure Call' approach you can also consider to communicate via messages. 除了WCF提供的“远程过程调用”方法外,您还可以考虑通过消息进行通信。
Both approaches have its advantages and disadvantages. 两种方法都有其优点和缺点。 Therefore, you should consider it based on your requirements. 因此,您应该根据自己的要求进行考虑。 Maybe this article could be useful: http://eneter.blogspot.com/2010/07/interprocess-communication.html . 也许这篇文章可能有用: http : //eneter.blogspot.com/2010/07/interprocess-communication.html

In case of messaging based communication, You can check Eneter Messaging Framework. 如果是基于消息的通信,则可以检查Eneter消息框架。
It is easy to use and you can download it from http://www.eneter.net . 它易于使用,您可以从http://www.eneter.net下载。
Examples for scenarios similar to yours you can find on http://eneter.blogspot.com . 您可以在http://eneter.blogspot.com上找到类似于您的场景的示例。

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

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