Data Access Object

本文详细解析了数据访问对象(DAO)设计模式,阐述其在多种编程语言、软件持久性和数据库类型中的普遍适用性。重点介绍了DAO作为应用程序和数据库之间的中介,负责在对象和数据库记录之间传输数据的功能。通过实例说明了在Java语言环境下,DAO概念可以采用多种方式实现,包括简单接口分离数据访问部分与应用逻辑、框架、商业产品和特定技术如Java持久化技术、JDO等的应用。此外,还提到了基于对象关系映射(ORM)的商业产品,如TopLink,以及流行的开源ORM产品,如Doctrine、Hibernate、iBATIS和Apache OpenJPA。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://en.wikipedia.org/wiki/Data_access_object

摘抄几句我觉得说的很好的话:

1,Although this design pattern is equally applicable to most programming languages, most types of software with persistence needs, and most types of databases, it is traditionally associated with Java EE applications and with relational databases accessed via the JDBC API because of its origin in Sun Microsystems' best practice guidelines

2,act as an intermediary between the application and the database. They move data back and forth between objects and database records.

3,In the specific context of the Java programming language, Data Access Objects as a design concept can be implemented in a number of ways. This can range from a fairly simple interface that separates the data access parts from the application logic, to frameworks and commercial products. DAO coding paradigms can require some skill. Use of technologies like Java persistence technologies and JDO ensures to some extent that the design pattern is implemented. Technologies like Enterprise JavaBeans come built into application servers and can be used in applications that use a JEE application server. Commercial products like TopLink are available based on Object-relational mapping (ORM). Popular open source ORM products include Doctrine,Hibernate, iBATIS and Apache OpenJPA.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值