Hi all, I am trying to use DAO for Data Access. I have a DAOFactory that is used to return the implementations of DAO's. One particular DAO returns a Value Object and a session bean is used in between DAO and Value Object which just calls the DAO method and returns a value object. It is this session bean that is called in the Business Delegate of the Struts. But my doubt is the Value Object. Should I have 2 value Objects?. One for DAO and one for session beans?. I am a kind of confused.
I have no problem with that at all. Using the same ValueObject in both places makes the client dependent on changes to the underlying data model.
Some times there is value in making very specific VOs that contain exactly what the client needs, no more, no less, and making different ones for different clients. I wouldn't do that on my first cut, though. Only after performance or some other strong reason comes up. [ January 12, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi