将BL公开为WCF服务 [英] Exposing BL as WCF service

查看:92
本文介绍了将BL公开为WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个中间层项目,该项目封装了部署在LAN中的产品的业务逻辑(使用DAL层,并为Web应用程序服务器[ASP.net]服务). BL充当一堆服务和数据对象,可在用户操作时调用.

目前,DAL充当单独的应用程序,而BL使用它,但但被Web应用程序用作DLL. DAL和Web应用程序都部署在组织内部的不同服务器上,并且由于BL DLL被Web应用程序使用,因此它位于同一服务器中.

将BL公开为DLL的最糟糕的事情是,我们无法完全了解公开的内容.部署并不是什么大问题,因为大多数情况下,产品版本是一起部署的.

您是否建议从DLL迁移到WCF服务?如果是这样,为什么?你认识有类似经历的人吗?

谢谢!

I''m working on a middle-tier project which encapsulates the business logic (uses a DAL layer, and serves a web application server [ASP.net]) of a product deployed in a LAN. The BL serves as a bunch of services and data objects that are invoked upon user action.

At present times, the DAL acts as a separate application whereas the BL uses it, but is consumed by the web application as a DLL. Both the DAL and the web application are deployed on different servers inside organization, and since the BL DLL is consumed by the web application, it resides in the same server.

The worst thing about exposing the BL as a DLL is that we lost track with what we expose. Deployment is not such a big issue since mostly, product versions are deployed together.

Would you recommend migrating from DLL to WCF service? if so, why ? Do you know anyone who had a similar experience ?

Thank you !

推荐答案

从DLL迁移到WCF服务"简直是胡言乱语.这些概念是无关的.在.NET中,DLL根本不是一个概念.有程序集,DLL或EXE或其他任何内容—没有本质区别.任何程序集都可以被另一个程序集引用和使用,甚至是EXE(有时也用于某些应用程序),但是引用的程序集肯定是在同一台机器和同一进程上使用的. WCF是一种进程间工具;并且不同的进程可以在不同的机器上.没有从一个迁移到另一个的事情.

而且,我不认为暴露" BL就这一层的性质而言是没有道理的.我看起来您完全迷失在体系结构中.如果您共享最终目标,向应用程序解释了主要要求以及更多详细信息,则可能会对此问题进行进一步的讨论.我怀疑它是否适合CodeProject快速问答的格式;答案.也许您只需要雇用合格的软件架构师?

—SA
"Migrating from DLL to WCF service" is gibberish. Those concepts are unrelated. In .NET, DLL is not a concept at all. There are assemblies, DLL or EXE or anything else — there is no essential difference. Any assembly can be referenced and used by another assembly, even EXE (and this is sometimes used for certain applications), but a referenced assembly is certainly used on the same machine and the same process. WCF is an inter-process facility; and the different processes can be on different machine. There is no such thing as migrating from one to another.

Also, I don''t think "exposing" BL makes sense, ever, by the nature of this layer. I looks like you are completely lost in the architecture. Further discussion of this matter could be possible if you shared your ultimate goals, explained major requirements to the application and a lot more detail. I doubt it fits into the format of CodeProject Quick Questions & Answers. Maybe you simply need to hire a qualified software architect?

—SA


这篇关于将BL公开为WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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