讨论 - 客户端服务器应用程序架构 [英] Discussion - Client Server Application architecture

查看:45
本文介绍了讨论 - 客户端服务器应用程序架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 .Net 4、C# 和 SQL Server 开发一个基于客户端-服务器的桌面应用程序.

I want to develop a client-server based desktop application using .Net 4, C# and SQL Server.

请参考图片了解我的想法.

Please refer to the image for what i am thinking about.

会有一个服务器应用程序访问windows服务或web服务.客户端应用程序将具有多文档界面.

There will be a server application accessing windows service or web service. The client application will have Multiple Document Interface.

以下是我的想法 -

  1. 客户端应用程序将使用与服务器应用程序的套接字连接,以便从服务器获得身份验证,并跟踪服务器上的客户端连接记录.
  2. 该服务将成为网络服务
  3. 身份验证成功后,客户端应用程序将直接访问 Web 服务,因此服务器不会过载.

我希望您对此提供反馈,这是一种很好的实施方式还是有更好的方式?我应该使用 Windows 服务而不是 Web 服务吗?我应该对所有数据通信使用套接字连接而不是直接使用网络服务吗?

I want your feedback on this whether it is a good way to implement or is there a better way? Should i use windows service instead of web service? Should i use socket connectivity for all data communication instead of directly consuming the web service?

感谢您分享您的时间和智慧.

Thank you for sharing your time and wisdom.

问候

伊凡

推荐答案

对于所有客户端/服务器通信,绝对使用 Web 服务边界.

Most definitely use a web service boundary for all your client/server communications.

WCF 会做你想做的一切.您可以使用不同的绑定,甚至自定义他们使用的安全类型.

WCF will do everything you want. You can expose multiple endpoints with different bindings, and even customize what kind of security they use.

花一些时间深入研究 WCF 文档,我认为您会发现它非常适合您的架构图,而且您需要的一切都是开箱即用的.

Spend some time digging into the WCF documentation and I think you will find it is perfectly suited to your architecture diagram, and everything you need will be out-of-the-box.

这篇关于讨论 - 客户端服务器应用程序架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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