Hi,
I am desinging an application where I am using Fast Lane Reader
Pattern (Stateless Session Bean + DAO) for reports. We have created seperate custom DTOs (Value objects) for each report. Now my question is - where should we place the logic to create the DTOs. Should we create the DTO in the DAO layer and return it to the session bean or create it in the session bean and fill it there. According to Core
J2EE patterns, the logic to create the DTO should go in the DAO. I guess this is a good idea when we have to create domain DTOs (the data from one single table), where one single call to the backend will return all the data related to the DTO. But in our case where we have to fire a seperate sql for each DTO field, I think, the logic should go in Session Bean. I am a bit confused. I would like to hear some expert views on that.
Thanks
Tomchi