DAO和DAL有什么区别? [英] What is the difference between DAO and DAL?

查看:143
本文介绍了DAO和DAL有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在学校学习过Java之后,我对DAO模式非常熟悉(数据访问对象 )。但是在工作中,我使用.NET。在.NET中,经常谈论DAL(数据访问层)。对我来说,他们的目的似乎很相似。所以问题是DAO和DAL基本上是同一件事吗? DAL是不是仅由术语组成,所以不会与数据访问对象混在一起?

Having studied Java at school I am quite familiar with the DAO-pattern(Data access object). However at work I use .NET. In .NET there is often talk about the DAL(Data Access Layer). To me their purpose seems quite similar. So the question is are DAO and DAL basically the same thing? Is the term DAL only made up so it wouldn't be mixed up with Data Access Objects?

推荐答案

数据访问层(DAL)是业务逻辑层和持久性/存储层之间存在的系统层。 。 DAL可能是单个类,也可能由多个数据访问对象(DAO)组成。它可能在顶层与业务层进行对话,从而隐藏了数据访问逻辑的复杂性。它可能是诸如Hibernate之类的第三方对象关系映射工具(ORM)。

The Data Access Layer (DAL) is the layer of a system that exists between the business logic layer and the persistence / storage layer. A DAL might be a single class, or it might be composed of multiple Data Access Objects (DAOs). It may have a facade over the top for the business layer to talk to, hiding the complexity of the data access logic. It might be a third-party object-relational mapping tool (ORM) such as Hibernate.

DAL是一个体系结构术语,DAO是一个设计细节。

DAL is an architectural term, DAOs are a design detail.

这篇关于DAO和DAL有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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