wood burning stoves*
The moose likes Struts and the fly likes Struts 1.2 :Sending data to DAO Layer  from Action class through ActionForm or DTO Object ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.2 :Sending data to DAO Layer  from Action class through ActionForm or DTO Object ??" Watch "Struts 1.2 :Sending data to DAO Layer  from Action class through ActionForm or DTO Object ??" New topic
Author

Struts 1.2 :Sending data to DAO Layer from Action class through ActionForm or DTO Object ??

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I have seen a Application , which used Struts 1.2 Framework for building User Interface .
When a Request is made from a Jsp Page , Inside the Action class , data is extracted from the FormBean and creates a new DTO and this DTO is actually passed to the DAO Layer for DataBase insertion .

Can you please tell me what is the advanatage we get in this rather than directly submitting the FormBean to the DAO Layer .

Please share your ideas .

Thanks in advance.


Save India From Corruption - Anna Hazare.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Separation of concerns: the lower levels are not dependent on Struts, and can be re-used.
 
Don't get me started about those stupid light bulbs.
 
subject: Struts 1.2 :Sending data to DAO Layer from Action class through ActionForm or DTO Object ??