如果ObjectDataSource控件是不是一个大型应用程序的答案是什么? [英] If ObjectDataSource isn't the answer for a large application, what is?

查看:126
本文介绍了如果ObjectDataSource控件是不是一个大型应用程序的答案是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

引述安德鲁野兔 href="http://stackoverflow.com/questions/882817/object-datasource-or-$c$c-behind-which-is-better">This问。

Quoting the answer of Andrew Hare on the This Question.

对象的数据源是不错的小   项目,但他们没有很好地扩展为   你嵌入数据层   在UI层信息的   应用。我建议你   只使用其中的很小   应用程序和暂存测试   东东。如果你犯了一个设计决定   使用它们是ppared斗争$ P $   与缩放和维护问题   未来。

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.

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

Application Architecture = Maintainability + Scalability + ......

我认为,我已经读开始每一篇文章,学习中的应用架构中使用的一些类来建立业务数据层,并使用 ObjectDataSource控件连接presentation层与业务层。

And I think, every article that I've read to start learning application architecture used some classes to build up the business data layer and used ObjectDataSource to connect the presentation layer with the business layer.

看起来像我已经得到了完全错误的。什么是真正用于业务层及其与presentation层连接的最佳方法?

Looks like I've got all wrong. What's really the best approach to use for the business layer and its connection with the presentation layer?

推荐答案

我不使用ObjectDataSource控件;就个人而言,我喜欢在结合过程的控制,所以我就直接通过绑定的DataSource属性,而不是使用DS控制。由于DS控件时绑定或不绑定,我不喜欢攻到事件取消绑定,只是因为我不想在那个特定的时间做...它可以屏蔽某些类型的编码失误,很难使其调试,但如果有错误,你可以点击进入选择,插入等事件和处理错误,我相信。

I don't use the ObjectDataSource; personally, I like the control over the binding process, so I bind directly through the DataSource property, and not use the DS controls. Because the DS controls when to bind or not bind, I dislike tapping into events to cancel binding only because I didn't want to do it at that specific time... It can mask some types of coding blunders, making it harder to debug, but if there is an error, you can tap into the selected, inserted, etc. event and handle the error, I believe.

不过,我不明白为什么它的错误;我不明白为什么它不会很好地扩展...如果它适合你,而当你测试的表现还算可以,那为什么不我会说。

However, I don't see why its wrong; I am not quite sure why it wouldn't scale well... if it works for you, and when you test the performance is OK, then why not I would say.

HTH。

这篇关于如果ObjectDataSource控件是不是一个大型应用程序的答案是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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