数据访问层作为Web服务-这是一个好主意吗? [英] Data Access Layer as a web service -- Is this a good idea?

查看:54
本文介绍了数据访问层作为Web服务-这是一个好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经研究了一段时间,实际上已经创建了ASP.NET Web服务原型作为DAL,用于一些ASP.NET 2.0网站.只是想向经验丰富的开发人员提供一些见识/建议,他们已经成功地将DAL部署为Web服务.将DAL部署为Web服务有哪些弊端/风险?确保或验证此Web服务使用的最佳方法是什么? WCF没问题,我将在VS 2005中进行编码.

I have been researching for a while and have actually created a prototype ASP.NET web service as a DAL for a few ASP.NET 2.0 web sites. Just would like to ask for some insight/advice from more experienced developers out there who had successfully rolled out DAL as a web service. What are the drawbacks/risks to deploying DAL as a web service? What is the best way to secure or authenticate consumption of this web service? WCF is out of the question, I'll be coding in VS 2005.

谢谢.

推荐答案

我认为,这种方法的最大缺点是调用Web服务的额外开销.如果您需要频繁查询/更新DAL,这可能会变得很慢.

I think, that biggest drawback of such approach is additional overhead of calling web service. If you need frequent queries/updates to DAL, this can get quite slow.

我的观点是,这种方法是一种过度设计的方法,除非您真的需要为不同的使用者在物理上分离DAL,并且需要在DAL中进行一些其他的验证/处理(反正还是错的).

My opinion is, that such approach is kind of overengineering, unless you really need to have physically separate DAL for different consumers and you need some additional validation/processing in DAL (which is kind of wrong anyway).

确保安全非常简单.您可以将SSL和IIS身份验证一起用于公共服务接口.

Securing can be quite a simple. You can use SSL together with IIS authentication for your public service interface.

那是我的$ 0.03

So, those are my $0.03

这篇关于数据访问层作为Web服务-这是一个好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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