If ObjectDataSource isn't the answer for a large application, what is?

末鹿安然 提交于 2019-12-01 17:58:58

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.

There is no doubt that ObjectDataSource makes the binding process easier.

It handles filtering, paging etc..with less headache.

Points to be considered.

  • View(.aspx) has reference to the Business object so it restricts some of the tasks like Refactoring while the application grows bigger.
  • Many application nowadays use IoC and ODS does not support that.
  • ODS works on parameters and if filter conditions increase we have to increase no. of parameters in the Business which is also not desirable.

So if we consider all these points ODS does not scale well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!