简体   繁体   English

C#windows应用程序 - 希望将我的业务和数据层保存在单独的机器中并使用WCF访问它

[英]C# windows application - want to keep my business and data layer in a seperate machine and use WCF to access it

I am working on a windows application already splitted up into layers(UI, Business and Data Layers). 我正在开发一个已经拆分为图层(UI,业务和数据层)的Windows应用程序。 I want to keep my business and data layer in a seperate machine, so that user need to have the UI layer installed in his machine. 我希望将我的业务和数据层保存在单独的机器中,以便用户需要在他的机器中安装UI层。 Is it a good idea to use the WCF web service and access my business layer and data layer through it? 使用WCF Web服务并通过它访问我的业务层和数据层是一个好主意吗?

Actually it depends... 实际上这取决于......

If it is only thin UI layer you want to move to a user machine and then call your services with each user action then I think it is a really bad idea. 如果它只是瘦UI层,你想移动到用户机器然后用每个用户操作调用你的服务,那么我认为这是一个非常糟糕的主意。 Because in this case a user has a windows application which in fact responses like a web application (of course if you think of communicating via internet not local network). 因为在这种情况下,用户有一个Windows应用程序,实际上响应就像一个Web应用程序(当然,如果你想通过互联网而不是本地网络进行通信)。 So if I were you I would better create a multi-tenant web application which uses all your already implemented business logic. 所以,如果我是你,我会更好地创建一个多租户Web应用程序,它使用您已经实现的所有业务逻辑。 Also this would prevent you from having a lot of versioning issues because you have full control of you UI application unlike with windows application when you have to deal with multiple versions of your solution or at least to implement some error handling logic to make all users upgrade to a newer version to proceed working. 此外,这将阻止您有很多版本问题,因为您完全控制您的UI应用程序,而不像Windows应用程序,当您必须处理多个版本的解决方案或至少实现一些错误处理逻辑,以使所有用户升级更新版本继续工作。

However, if your application mostly work offline and there is only some logic which really needs to be common for all users then your choice should be WCF. 但是,如果您的应用程序主要脱机工作,并且只有一些逻辑确实需要为所有用户共同,那么您的选择应该是WCF。 It provides you with all the tools for securing and configuring the communication channel on the configuration level without even rebuilding your application. 它为您提供了在配置级别保护和配置通信通道的所有工具,甚至无需重建您的应用程序。 There are also a lot of built-in options for binding and behavior configuration. 还有许多用于绑定和行为配置的内置选项。

Hope it helps. 希望能帮助到你。

使用wcf是一个很好的主意,它可以很好地工作但是维护软件并在多台机器上保持最新状态将成为一个问题,因为客户数量不断增长.....如果你在本地网络工作也许您应该考虑在终端服务器上安装应用程序并通过rdp会话连接,或者您可以创建UI的Web版本

暂无
暂无

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

相关问题 Windows窗体应用程序如何从数据层C#访问UI层中的datagridview - How to access datagridview in UI layer from data layer C# ?windows forms application 任何样本C#项目都会突出显示单独的数据访问层(使用EF)到业务逻辑层 - Any sample C# project that highlights separate data access layer (using EF) to business logic layer 用于业务和数据层的 WCF 主机 - WCF host for business and data layer C#中的数据访问层 - Data Access Layer in c# 在单独的数据访问和业务逻辑层中,我可以在业务层中使用Entity框架类吗? - In separate data access & business logic layer, can I use Entity framework classes in business layer? 如何在 C# 应用程序中从远程桌面访问 WCF 服务到另一台机器? - How to access WCF service from Remote Desktop to another machine in c# application? 使用自上而下的体系结构,我的业务层无法访问我的数据访问层,这是怎么回事? - With top down architecture my business layer can't access my data access layer, what's wrong? 在与C#分开的过程中访问Flex应用程序ActiveX / ExternalInterface? - Access Flex Application ActiveX / ExternalInterface in seperate process from C#? C#,WCF,想创建一个聊天应用程序,我应该使用什么绑定? 也许一些例子? - C#, WCF, want to make a chat application, what binding should I use? maybe some examples? 如何制作数据访问层C# - how to make data access layer C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM