DataSet的痛点? [英] DataSet pain points?

查看:107
本文介绍了DataSet的痛点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在审阅经典ADO .NET上的课程大纲,特别是关于DataSet主题。  它讨论了经典ADO .NET的优缺点,并在后面的章节中讨论了ORM。陈述如下:


1。 DataSet需要更少的编码,但灵活性更低.b
2.使用DataSet,非标准行为变得复杂


有人可以更深入地解释这一点,也许是一些例子?

解决方案

CodeOfLogic,


<强>>大于1。 DataSet需要较少的编码但灵活性较低
2。使用DataSet,非标准行为变得复杂。


尽管数据集能够强类型化并封装业务逻辑,但它们不是真正的业务对象。例如,您需要浏览
DataSet 中的关系对象,以连接父行和子行。这对于面向对象的程序员来说并不直观,他们用简单的术语来思考父子关系;每个父项都具有子集合属性,每个子项都有父属性。此外,
DataSet 范例不允许继承,这对于面向对象的开发人员来说也是非常重要的。
DataSet 中的空值也需要特殊处理。


祝你好运,


Cole Wu


I'm reviewing my syllabus on classic ADO .NET, specifically on the DataSet topic.  It discusses the pros and cons of classic ADO .NET and in later chapters moves on to ORMs. The following is stated:

1. DataSet requires less coding but has less flexibility
2. With a DataSet, non-standard behavior becomes complex

Could someone please explain this more in depth, perhaps with some examples?

解决方案

Hi CodeOfLogic,

>>1. DataSet requires less coding but has less flexibility 2. With a DataSet, non-standard behavior becomes complex.

Despite Dataset's ability to be strongly typed and to encapsulate business logic, but they are not true business objects. For example, you need to navigate through relationship objects in the DataSet to connect between parent and child rows. This is not intuitive to object oriented programmers, who think of parent child relationships in simpler terms; each parent has as a child collection property and each child has a parent property. Furthermore, the DataSet paradigm does not allow for inheritance, which is also extremely important to object-oriented developers. Null values in a DataSet also require special handling.

Best regards,

Cole Wu


这篇关于DataSet的痛点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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