Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between DTO,FormBean & ActionForm

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am going through the book

"Programming Jakarta Struts" by Chuck Cavaness...

I am not able to differentiate between a FormBean , DTO and ActionForm

can anyone throw some light on this?

Regards,
Aneesh
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Struts, the terms ActionForm and Form bean are pretty much synonymous. They both refer to JavaBean that has the Struts ActionForm as an ancestor. A DTO, however is an JavaBean that follows the Transfer Object Java EE pattern. A DTO's job is to transfer data to and from the Model objects. A DTO might have similar properties to your ActionForm, but it should not Extend the Struts ActionForm. The reasoning behind this is that you want to keep your model objects free of any dependencies on on a View platform such as Struts.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merrill......

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic