JavaBean, POJO, VO, DTO, DAO 异同
来源:互联网 发布:行知实验园 编辑:程序博客网 时间:2024/06/07 20:42
refs:
https://dzone.com/articles/database-interaction-dao-and
http://java-base.com/javabean-vs-dto-vs-pojo-jknb/
Plain Old Java Object (POJO)
The name is used to emphasize that a given object is an ordinary Java Object, not a special object. It has absolutly no restrictions.
POJO, or Plain Old Java Object, is a normal Java object class (that is, not a JavaBean, EntityBean etc.) and does not serve any other special role nor does it implement any special interfaces of any of the Java frameworks. This term was coined by Martin Fowler, Rebbecca Parsons and Josh MacKenzie who believed that by creating the acronym POJO, such objects would have a “fancy name”, thereby convincing people that they were worthy of use.
JavaBean
JavaBean is a simple java class or POJO, but with some restrictions. This is the main difference between a POJO and a JavaBean. Some of the restrictions are:
- JavaBean should provide default public constructor.
- JavaBean should provide property accessor methods (getters and setters).
- JavaBean should be serializable.
JavaBean is a example of POJO that is serializable, has a no-argument constructor, and allows access to properties using getter and setter methods that follow a simple naming convention.
Value Object (VO)
Value Object is simple object that holds values. The VO should be entirely immutable.
Data Transfer Object (DTO)
DTO is serializable object, which is used for transfering data between different processes. It shouldn’t be mixed with VO. This is exposed as design pattern.
Data Access Object (DAO)
This is an object, which provides mechanism for accessing objects from the persistance layer. This is actually one of the most popular design patterns.
- JavaBean, POJO, VO, DTO, DAO 异同
- JavaBean, EntityBean, POJO, PO, BO,VO,DTO,DAO 区别
- JavaBean, EntityBean, POJO, PO, BO,VO,DTO,DAO 区别
- Javabean,POJO,PO,VO,DTO
- JavaBean、POJO、DAO、DTO小考
- DTO DAO VO BO PO POJO区别
- PO BO VO DTO POJO DAO 概念
- PO BO VO DTO POJO DAO概念
- PO BO VO DTO POJO DAO概念
- PO、VO、BO、DTO、POJO、DAO详解
- PO.BO.VO.DTO.DAO.POJO
- po,bo,vo,dto,pojo,dao区别
- PO VO BO DTO POJO DAO
- PO、VO、BO、DTO、POJO、DAO 详解
- PO、VO、BO、DTO、POJO、DAO
- 分析VO、POJO、DTO、DAO、PO......
- PO/VO/DTO/POJO以及JavaBean介绍
- PO、VO、DTO、POJO以及JavaBean介绍
- Android UI性能优化(一)
- 关于蓝牙通信文档 Android建立蓝牙RFCOMM通信
- vb
- 同时也希望通过分享来增
- 同时也希望通过分享来增
- JavaBean, POJO, VO, DTO, DAO 异同
- android studio很好的一个JNI 入门博文
- Adnroid ndk 中jni访问java方法、对象、成员变量
- 同时也希望通过分享来增同时也希望通过分享来增同时也希望通过分享来增同时也希望通过分享来增
- MyBatis学习 之 三、动态SQL语句
- Lombok 安装、入门 - 消除冗长的 java 代码
- 同时也希望通过分享来增
- android native 内存泄露检查(libc.debug.malloc )
- LinuxC/C++编程(6)—重定向、管道重定向