Originally posted by Harish Vembu:
My two questions for the forum are given below are based on Design patterns:
1. What are Value Objects and why are they needed in Enterprise application development and their role in such apps and its significance and typical benefits. Please give me a good reference material for Value Object Design pattern. I could not find a good one on the Net.
we use value object to transfer data between client and backend . it called VO for sake of simplicity.
usually when a remote object need some data , data are assembeled in a DTO and sent to that remote object. sometimes data that a dto carry is more that requirement of that remote object.but we send those additional data to avoid more remote function calls
sometimes it called Data Transfer Object or simply DTO,
2. As per my understanding DAO pattern are basically used to simplify data access to underlying databases in Enterprise applications where EJB's are not used. Does use of a DAO layer mean use of an DAO Pattern?. In such a case Can a DAO layer be used even for an EJB based J2EE application?.
yes you can use DAO layer even if you use EJB for persistence purpose.
main purpose of DAO is encapsulation of data access in a separate layer
correct use of dao layer which is a composition of DTO , and DAO itself make our application independent from persistence mechanism.
for example you can switch from a jdbc backend to a hibernate one in case that you need.
[ March 15, 2006: Message edited by: Masoud Kalali ]