在Web应用程序中使用WCF [英] Use of WCF in web applications

查看:91
本文介绍了在Web应用程序中使用WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发三层Web应用程序。层是UI,业务对象层和数据访问层。

我可以使用WCF来实现DAL。是否有任何缺点并且是否推荐?

I am developing three tier web application. Tiers are UI, Business Object Layer and Data access layer.
Can I use WCF to implement DAL. Is there any disadvantages and is it recommended ?

推荐答案

我认为您可以使用它来实现DAL,但是您无法使用WCF 实现DAL 。您可以将WCF服务接口用作DAL的 facade ,因此使用DAL的代码将充当WFC客户端,您可以使用它来提供适当的抽象。在同一类型中,在DAL实现的深度,您将需要其他东西来处理实际的数据库,例如,ADO.NET。我想如果你看看DAL的解释,你会清楚地看到它:

http:// en。 wikipedia.org/wiki/Data_access_layer [ ^ ]。



-SA
I think you can use it to implement DAL, but you cannot implement DAL with WCF along. You can use a WCF service interface as a facade for DAL, so the code using your DAL would do it acting as a WFC client, which you can use to provide a proper abstraction. At the same type, in depth of your DAL implementation, you will need something else to work with actual database, for example, ADO.NET. I think if you look at explanation of DAL, you will clearly see it:
http://en.wikipedia.org/wiki/Data_access_layer[^].

—SA


这篇关于在Web应用程序中使用WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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