IntelliJ Java IDE
The moose likes Struts and the fly likes Bus iness validation  - where and why? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Bus iness validation  - where and why?" Watch "Bus iness validation  - where and why?" New topic
Author

Bus iness validation - where and why?

Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 126
I believe that we prefer to validate all business scenarios in teh action class;rather than the ActionForm - simply because ActionForm are meant to be contain application state that are driven by the business conditions.
So,validating business in the form is risky as the same form may be used in different scenarios needing different state and validations.

But is there any other technical reason(vis-a-via a design decision) on why the action class should be preferred over the actionForm for handling business scenarios?
 
 
subject: Bus iness validation - where and why?
 
Threads others viewed
Why do we need ActionForm ?
Struts 1 Would ActionForm be Null
data transfer from action to biz service
How to access forms in action classes
A buildDTO() in Action or in ActionForm ???
developer file tools