gpt4 book ai didi

c# - 如果 ObjectDataSource 不是大型应用程序的答案,那什么才是?

转载 作者:太空狗 更新时间:2023-10-29 23:11:01 28 4
gpt4 key购买 nike

引用Andrew Hare的回答在 This Question 上.

Object data sources are nice for small projects but they do not scale well as you are embedding data-layer information in the UI layer of your application. I would suggest that you only use them for very small applications and scratch-pad testing stuff. If you make a design decision to use them be prepared to struggle with scaling and maintenance issues in the future.

应用架构=可维护性+可扩展性+......

而且我认为,我阅读的每一篇开始学习应用程序架构的文章都使用一些类来构建业务数据层,并使用 ObjectDataSource 将表示层与业务层连接起来。

看来我都错了。用于业务层及其与表示层的连接的真正最佳方法是什么?

最佳答案

毫无疑问,ObjectDataSource 使绑定(bind)过程更加容易。

它可以轻松处理过滤、分页等问题。

要考虑的要点。

  • View(.aspx) 引用了业务对象所以它限制了一些像重构这样的任务应用程序变得更大。
  • 许多 现在的应用程序使用 IoC 和 ODS 不支持。
  • ODS 致力于 参数和if过滤条件 增加我们必须增加不。的 业务中的参数是 也不可取。

因此,如果我们考虑所有这些要点,ODS 就无法很好地扩展。

关于c# - 如果 ObjectDataSource 不是大型应用程序的答案,那什么才是?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4485946/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com