Microsoft 试图通过所有这些数据访问策略解决什么问题?

发布于 2024-07-26 07:23:29 字数 165 浏览 7 评论 0原文

微软似乎推出了许多不同的数据访问策略。 有“经典”ADO.NET、Linq2Sql、ADO.NET 实体框架、ADO.NET 数据服务、ADO.NET 动态数据。 我确信我错过了一些。 在我看来,每个框架在应用程序架构中的位置似乎存在很多混乱。 Microsoft 试图通过所有这些数据访问方法解决什么问题?

There seems to be many different data access strategies coming out of Microsoft. There’s ‘classic’ ADO.NET, Linq2Sql, ADO.NET Entity Framework, ADO.NET Data Services, ADO.NET Dynamic Data. I’m sure that I’ve missed some. To me, it seems that there’s a lot of confusion surrounding where each frameworks fit into an application's architecture. What problem is Microsoft trying to solve with all of these data access methods?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

(り薆情海 2024-08-02 07:23:29

我不明白这个问题的意义。 事实上,这有点恶搞。

  • ADO.NET 是.NET 1.0 的原始数据访问技术。 它显然不属于任何新数据访问“策略”的讨论。LINQ
  • to SQL 是原始 LINQ 提供程序之一。 它提供数据库结构和程序中使用的类型之间的一对一映射。 它的目的是使与 SQL Server
  • ADO.NET Entity Framework 一起工作更加灵活。 它旨在与任何 ADO.NET 提供程序一起使用,并且具有映射层,因此该程序可以使用更接近于业务实体而不是数据库表的类。 例如,单个实体可能包括来自多个表的数据。 Microsoft 决定在 EF 上投入比在 LINQ to SQL 上更多的精力。
  • ADO.NET 数据服务是 EF 上的服务层。 如果您打算开发自己的服务,只是为了公开您的数据,那么这是一个不错的选择。 它使用REST接口,并且可以以ATOM格式公开数据。
  • ASP.NET 动态数据不是数据访问策略。 请参阅http://www.asp.net/dynamicdata/

这些区别非常明显,只需进行少量研究就可以清楚地了解它们。

I don't see the point of this question. In fact, it's a bit trollish.

  • ADO.NET is the original data access technology from .NET 1.0. It clearly doesn't belong in any discussion of new data access "strategies"
  • LINQ to SQL is one of the original LINQ providers. It provides a one-to-one mapping between database structures and the types used in a program. It was meant to work with SQL Server
  • ADO.NET Entity Framework is more flexible. It was meant to work with any ADO.NET provider, and has a mapping layer, so that the program works with classes that are closer to being business entities than to database tables. For instance, a single entity may include data from multiple tables. Microsoft has decided to spend more effort on EF than on LINQ to SQL.
  • ADO.NET Data Services is a services layer over EF. If you were going to produce your own service to do nothing more than expose your data, then it's a decent bet. It uses a REST interface, and can expose the data in ATOM format.
  • ASP.NET Dynamic Data is not a data access strategy. See http://www.asp.net/dynamicdata/.

The distinctions are clear enough that a trivial amount of research would have made them clear.

北渚 2024-08-02 07:23:29

他们正在努力解决如何增加销量和市场份额的问题。 为此,微软内部的各个小组试图解决如何让更多的开发人员和最终用户使用他们的产品的问题。 不同的团队提出了不同的技术,与任何大公司一样,微软努力保持其技术的一致性,并让团队朝着同一目标努力。 此外,随着新技术的出现,他们需要保持(或者更好的是,设定)步伐,并继续支持客户投资的旧技术。对于任何类型的相当大的公司(包括微软)来说,最终结果都是技术选择的选择有些混乱。

They are trying to solve the problem of how to increase sales and market share. To that end various groups within Microsoft try to attack the problem of how to get more developers and end-users using their products. Different groups come up with different technologies and like any big company, Microsoft struggles to keep it's technologies aligned and groups working toward the same end. Additionally, as newer technologies come along they need to keep (or better yet, set) the pace as well as continue to support older technologies that their customers have invested in. The end result for any sort of reasonably large company, including Microsoft, is a somewhat muddled selection of technology selections.

黑凤梨 2024-08-02 07:23:29

他们多年来一直制定数据策略。 事实上,您可以而且应该搜索“Microsoft 数据访问策略”,您会找到新旧链接(即 1998 年及其 OLEDB 策略)。

我认为您正在寻找的是 这里从 2007 年开始,尽管已经有 2 岁了,但它是关于 XML、ADO.NET、数据、LINQ、SQL Server、Visual Studio Orcas、Entity Framework...他们解决了这个问题 Microsoft 是否有数据访问策略吗?

是的,事实证明我们确实如此。 微软
设想一个实体数据平台
使客户能够定义一个通用的
跨数据服务的实体数据模型
和应用程序。 实体数据
平台是一个多发布的愿景,
未来版本的报告
工具、复制、数据定义、
安全等一切都是围绕
通用实体数据模型。
...

Mike Pizzo,数据架构师
可编程性

我希望它有所帮助。

They have had a data strategy for ages. In fact you can and should search "Microsoft Data Access Strategy" and you will find links old and new (i.e. year 1998 and their OLEDB strategy).

I think what you are looking for is here from year 2007 that even though is 2 years old is about XML, ADO.NET, Data, LINQ, SQL Server, Visual Studio Orcas, Entity Framework...they address the question Does Microsoft have a Data Access Strategy?:

Yes, it turns out we do. Microsoft
envisions an Entity Data Platform that
enables customers to define a common
Entity Data Model across data services
and applications. The Entity Data
Platform is a multi-release vision,
with future versions of reporting
tools, replication, data definition,
security, etc. all being built around
a common Entity Data Model.
...

Mike Pizzo, Architect, Data
Programmability

I hope it helps.

不疑不惑不回忆 2024-08-02 07:23:29

你的困惑就是我们的挫败。 我们中的许多为我们的网站做出这些架构决策的人都对微软在这个问题上缺乏清晰度和良好的开发实践表示不满。

我的团队确实被 Linq2Sql 烧伤了。

我们现在使用领域驱动设计方法,特别是巴勒莫的洋葱架构( http://jeffreypalermo.com/blog/the-onion-architecture-part-1/)。 业务对象只是 POCO,不依赖于基础设施。

基础设施现在由 NHibernate 和我们的 CMS 的定制 ORM 处理。 社区将继续将 NHibernate 推向最佳方向,并且我们控制着 ORM 的源代码,这一点远远超过了这些痛苦的启动成本。 更糟糕的是,微软确实发布了一些在 DDD 架构中工作的真正引人注目的东西,我们只需要重写我们的基础设施层。

You confusion is our frustration. A lot of us who make these architectury decisions for our websites have thrown our hands up with Microsoft's lack of clarity and good development practices on this issue.

My team certainly got burned by Linq2Sql.

We now build our website with a Domain Driven Design approach and specifically Palermo's Onion Architecture (http://jeffreypalermo.com/blog/the-onion-architecture-part-1/). Business objects are just POCOs and have no dependencies on infrastructure.

The infrastructure is now handled by NHibernate and a custom rolled ORM for our CMS. The painful startup costs for these have been far outweighed by the knowledge that the community will continue to move NHibernate in the best direction and we control the source to our ORM. Worse comes to worse and Microsoft does release something really compelling that works in a DDD architecture, we just need to rewrite our infrastructure layer.

清晨说晚安 2024-08-02 07:23:29

我在 http://msdn.microsoft.com/en-us 找到这篇文章如果您不熟悉底层概念,/magazine/cc700331.aspx 是一个很好的实体框架技术介绍。

以下是与此问题相关的部分,解释了 EF 的一些目标以及与 ADO.Net 的关系...

ADO.NET 实体框架是 ADO.NET 的演变,也是 EDM 的第一个具体实现,在针对关系数据库进行开发时提供了更高级别的抽象。 在 1.0 版本中,团队一直专注于构建平台的基础,而不仅仅是简单的 ORM,这将允许开发人员针对具有非常灵活的映射和适应高度的能力的概念或对象模型进行工作。与基础商店的差异。

这种高度的灵活性和与底层存储的差异是允许数据库和应用程序单独发展的关键。 当数据库架构发生更改时,应用程序与实体框架的更改隔离开来,并且您通常不需要重写应用程序的部分内容,而只需在必要时更新映射文件以适应更改。

为了开始发展 ADO.NET 平台,实体框架构建在现有 ADO.NET 2.0 提供程序模型之上,并对现有提供程序进行了轻微更新以支持新的实体框架和 ADO.NET 3.5 功能。 我们选择在现有的 ADO.NET 提供程序模型之上实现,以确保提供程序模型为开发社区所熟悉。

I find the article at http://msdn.microsoft.com/en-us/magazine/cc700331.aspx a nice technical introduction to Entity Framework if you're not familiar with the underlying concepts.

Here is a section that is relevant to this question explaining some of EF's goals and relationship to ADO.Net...

The ADO.NET Entity Framework is an evolution of ADO.NET and the first concrete implementation of the EDM, providing a higher level of abstraction when developing against a relational database. In version 1.0, the team has been focused on building up the foundation of a platform, more than just a simple ORM, which will allow developers to work against a conceptual or object model with a very flexible mapping and the ability to accommodate a high degree of divergence from the underlying store.

This high degree of flexibility and divergence from the underlying store is the key to allowing the database and applications to evolve separately. When a change is made in the database schema, the application is insulated from the change by the Entity Framework, and you are often not required to rewrite portions of the application, but rather to simply update the mapping files if necessary to accommodate the change.

To begin evolving the ADO.NET platform, the Entity Framework is built on top of the existing ADO.NET 2.0 provider model, with existing providers being updated slightly to support the new Entity Framework and ADO.NET 3.5 functionality. We chose to implement on top of the existing ADO.NET provider model to ensure a provider model that is familiar to the development community.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文