Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Separation of concerns: the lower levels are not dependent on Struts, and can be re-used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic