ASP.NET Web应用程序的架构设计咨询 [英] ASP.NET web application architecture design advice

查看:154
本文介绍了ASP.NET Web应用程序的架构设计咨询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

previously直接使用ADO.NET我的ASP.NET Web应用程序连接到数据库。现在我想将它更改为3层,ASP.NET层,中间的Web服务层和后端数据库层。我觉得有益处,我可以抽象的数据源到ASP.NET前层,松散耦合和降低潜在的安全风险,让外侧露出ASP.Net Web应用程序,以便能够直接访问数据库,等等。

previously my ASP.NET web application connects to a database directly using ADO.NET. Now I want to change it to 3 layers, ASP.NET layer, middle web service layer and backend database layer. I think there is benefit that I could abstract data source to ASP.NET front layer, loosely coupled and reduce potential security risks to let external exposed ASP.Net web application to be able to access database directly, etc.

与3层体系结构2层建筑相比,我遇到了两个主要的问题。

Compared with 2 layer architecture with the 3 layer architecture, I met with 2 major issues.

  1. 这是额外的中间Web服务层将产生更多的流量,如: ASP.NET不会谈的数据库直接,但谈判到Web服务和Web服务谈判thedatabase,会招致更多的流量。它会是一个瓶颈?任何一般建议来解决这个问题,如果它是一个瓶颈?

  1. An additional middle web service layer will incur more traffic, e.g. ASP.NET does not talks to database directly, but talks to a web service and the web service talks to thedatabase, will incur more traffic. Will it be a bottleneck? Any general advice to solve this issue if it is a bottleneck?

由于ASP.NET无法连接到数据库,但连接到Web服务,它不能很容易地得到一个DataSet / DataTable对象。它变得难以present表格形式的数据,以数据绑定控件。任何想法,使presentation层在ASP.NET容易编码?

Since ASP.NET can not connect to database but connect to web service, it can not get easily a DataSet/DataTable object. It becomes hard to present table form data to data bound controls. Any ideas to make presentation layer in ASP.NET easier coding?

问候,
乔治

Regards,
George

推荐答案

如果你只的认为的还有一个好处,你不应该这样做。你说的是加入了大量的复杂性,并为自己工作,以性能为代价,code简单,和建筑简洁,为...什么?你有什么收获是值得这些费用?

If you only think there is a benefit, you should not do it. You are talking about adding a large amount of complexity and work for yourself, at the cost of performance, code simplicity, and architectural simplicity, for... what? What do you gain that's worth these costs?

你:

  • 有需要断开与数据库服务器的web前端(紧急安全相关的需求不,不是假设的我敢肯定,这将是更安全的,但显而易见的,具体的安全问题而不能由是聪明的您授予 ASP.NET应用程序)

  • Have urgent security-related needs that require disconnecting the web front-end from the database server (no, not hypothetical "I bet this would be more secure" but demonstrable, concrete security problems which cannot be solved by being smart about what DB rights you grant your ASP.NET application)

期待完全交换数据层出在某个时候在未来(可能是多次),从而需要从根本DB变化

Expect to swap your data tier out completely at some point in the future (probably repeatedly), and thus need to insulate your web codebase from radical DB changes?

在非常接近每一种情况下的答案,这些是否定的。这样做也只是增加痛苦为自己和其他人谁摸这个程序。

The answer to these in very nearly every case is no. Doing this would just be adding pain for yourself and anyone else who might touch this app.

这篇关于ASP.NET Web应用程序的架构设计咨询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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