DataSource对象或code-背后:哪个更好? [英] Object datasource or code-behind: which is better?

查看:162
本文介绍了DataSource对象或code-背后:哪个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个可以提升不少有争议的问题,但我想知道是什么人认为使用对象数据源的各种利弊。我正在做的一个项目,现在与其他程序员谁的经验和舒适程度都植根于传统的ASP,而我不能确定它的方式是要
一)得到迅速完成任务 二)获得以最简单的完成任务

I know that it's a subject that can raise a lot of debate, but I'd like to know what people think the various pros and cons of using Object Datasources are. I'm doing a project right now with another programmer who's experience and comfort level are all rooted in classic ASP, and I'm unsure of which way is going to
a) get the job done quickly b) get the job done with a minimum of fuss

我们有一个很好的资源库层域对象能够自我验证,因此这些方法都在地方做任何消耗臭氧层物质的结合,或code-后面结合。

We have a nice repository layer with domain objects capable of self-validation, so the methods are in place to do either the ODS binding, or code-behind binding.

我不喜欢的消耗臭氧层物质的最明显的原因,但如果它救我不必手工code分页/排序/选择/插入/更新/删除场景,才能真的有那么糟糕吗?

I dislike the ODS for most of the obvious reasons, but if it does save me from having to hand-code paging/sorting/selecting/inserting/updating/deleting scenarios, then can it really be that bad?

推荐答案

对象的数据源是不错的小项目,但他们并不能很好地为你嵌入数据层信息在应用程序的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.

这篇关于DataSource对象或code-背后:哪个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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