其实我pretty困惑这个术语,以及它们如何相互关联的。一个读一些了其中的每个人,但我不uderstant工作流程。
Actually i'm pretty confused about this terms and how they relate to each other. A read something about every one of them but i don't uderstant the work flow..
DTO - 数据传输对象 - 对象传输值BO业务对象 - 域模型对象。反对使业务逻辑与POCO - 不知道,我读过关于维基的定义,但没有什么了解道 - 数据访问对象 - 对象映射数据库表?
DTO - Data transfer object - object to transport values BO Business object - object in domain model. object to make Business logic with POCO - no idea, i've read a definition on wiki but didn't understood anything DAO - data access object - object to map the DB table ?
可能有人请带来一些光进入它我的?
Could someone please bring some light into it for me ?
推荐答案- DTO :数据传输对象,用来传输松耦合服务之间的数据
- POCO :普通老式CLR对象,CLR正常对象不使用任何属性或要求继承充当DAO / DTO
- BO :业务对象,包含业务逻辑,在解决方案的业务逻辑部分中使用
- DAO :数据访问对象,用于将数据从数据库传输
- DTO: Data Transfer Object, used to transfer data between loosly coupled services
- POCO: Plain Old Clr Object, normal CLR object doesn't use any attributes or required inheritance to act as a DAO/DTO
- BO: Business Object, contains business logic, used in the Business Logic part of your solution
- DAO: Data Access Object, used to transfer data from your database
因此,一个普通的工作流程是从一个服务,该服务发送到您的应用程序作为DTO请求数据,将其转换为一个BO来操作它,并发送回一个DTO或将其转换为DAO店后它在数据库中。
So a regular workflow would be to request data from a service, which is sent to your app as a DTO, you convert it to a BO to manipulate it and send it back as a DTO or after converting it to a DAO store it in a database.
您使用不同的对象为3种类型之间的单独的担忧,一个BO并不需要知道无论是使用一个数据库或服务持续存在。
You use the different object to separate concerns between the 3 types, a BO doesn't need to know whether it's persisted using a database or a service.
更多推荐
DTO DAO POCO BO
发布评论