Is Value Object Pattern and Data Access Object Pattern same or there are any differences
- Posted by: aakash bhatt
- Posted on: September 04 2003 07:39 EDT
- DTO /V/O by supraja madhavi on September 04 2003 07:45 EDT
- Value Object / Data Access Object by Ankur Jain on September 04 2003 10:33 EDT
- DAO examples (open source) by Sean Sullivan on September 04 2003 11:12 EDT
- Value Object / Data Access Object by Ian Mitchell on September 04 2003 14:01 EDT
They both are one and the same
I believe you means that Data transfer objects and Value objects are the same, but the original question was if the Value Object and Data Access Object are the same. I believe they are not. DAO is is used for the access to a persistent data store, and can use DTO/VO for transferring the data to the application.
They are definitely not the same.
Value object is just a representation of data..it is same as a normal class with just getter methods inside it.
Data Access Objects are used to deal with database. You use Value Objects in Data Access Objects in order to represent the data which you have fetched from database.
Did you mean to say Data Transfer Object rather than Data Access Object?
It is DTO's that are somewhat similar to Value Objects. We had a discussion on this recently: