C#N层项目设计/实施 [英] C# N-Tier Project Design/Implementation

查看:82
本文介绍了C#N层项目设计/实施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处理大量文件I/O和软件的软件工程项目中需要一些建议.文件操作.当前系统是使用SQL Server 2008数据库用Visual FoxPro 9编写的.编译后的应用程序位于通过局域网通过最终用户访问的应用程序服务器上.最终用户PC拥有他们执行的应用程序的快捷方式,这会导致夜间的交通繁忙,并且还导致应用程序服务器无非是光荣的硬盘驱动器/文件共享.我们的技术服务区域正在尝试通过为最终用户创建虚拟机来缓解此问题,以允许程序从应用服务器正确运行,以使应用直接与SQL Server通信,而不会在LAN周围反弹流量.我的第一个直觉是创建一个N层解决方案来替代当前流程,而我对此设计还很陌生.如果这是解决夜间网络延迟问题的最佳方法,请指出最佳实践方法.我的想法是将WPF或WinForms表示层,C#Windows服务作为应用程序服务器上的业务逻辑层来处理文件I/O,最后将SQL Server 2008和应用程序服务器上的文件共享作为数据层.我在实现N层体系结构的目标方面是正确的还是有什么我遗漏的东西或处理不当的东西?

解决方案

"n层"体系结构最初是指将应用程序分解为n大于3的不同机器上的物理上分离的服务(UI,BL ,DAL)通常是多个业务逻辑机器.

如今,通常将其理解为将应用程序划分为逻辑上分离的层,这些层可以或可以不在同一物理计算机上.

大多数应用程序是客户端/服务器应用程序,其中的UI和其余部分"明显分开.

对于您的情况,您应该首先将应用程序迁移到专用数据层,该数据层不是基于文件的VFP.

与其从一个点共享前端VFP,不如将其部署到客户端计算机上.


Need some advice on a software engineering project that deals with large amounts of File I/O & file manipulation. Current system is written in Visual FoxPro 9 with a SQL Server 2008 database. The compiled application sits on an application server that is accessed via end users across a LAN. The end users PC have shortcuts to the application which they execute causing severe traffic at night and also causes the app server to be nothing more than a glorified hard drive/file share. Our tech services area is attempting to alleviate the problem by creating virtual machines for end users to allow the program to run from the app server correctly in order for the application to directly talk with SQL Server without bouncing traffic around the LAN. My first instinct is to create a N-Tier solution to replace the current process and I''m fairly new to this design. If this is the best approach to resolve the nightly network latency issues, please point me in the way of best practice approach. My idea is to have WPF or WinForms Presentation Layer, C# windows services as the business logic layer on the app server to handle the File I/O, and finally SQL Server 2008 and a file share on the app server as the Data Layer. Am I correct in my goal of N-Tier architecture or is there something I''m missing or incorrectly handling?

Thanks

解决方案

The "n-tier" architecture originally refered to the breaking of the application into physically separate services on different machines where n being more than 3 (UI, BL, DAL) usually multiple business logic machines.

Today this is generally understood as breaking the application into logically separate layers, which may or may not be on the same physical machine.

Most applications are client/server apps where there is a clear separation of the UI and the "rest".

For your case you should first migrate your application to a dedicated data layer which is not file based like VFP.

Instead of sharing the front-end VFP from a single point deploy it to the client machines.


这篇关于C#N层项目设计/实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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