DTO DAO POCO BO
architecture, design-patterns, domain-driven-design
Solution
- 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
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.
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.
Problem
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 - 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 ?