Originally posted by David Yutzy:
1) No server-side validation. I don't use ANY client-side, javascript crap. Too many times I've had to rewrite stuff for NS, IE, Mac, Opera, etc.
You are correct in that client-side validation should not be relied on. Server-side validation for DynaActionForms can be handled in a couple of ways. You can subclass DynaActionForm and override the validate() method, or you can use the Struts Validator framework.
3) I simply don't want to use validation in XML. There are too many instances where I have to do DB lookups, business logic dependencies, etc. to validate input. The current XML based validation is too Javascript oriented and assumes that simple validation is the only thing you need.
Only input should be validated through ActionForms/DynaActionForms. Business logic validation should be handled in business objects. This is the reason only simple validation is assumed. So if I have a field that is a name,, the input validation might only check to see that it was two words with no numbers or symbols in it. Separate business logic validation would be used to determine whether or not the name entered is valid to access the system or whatever.
This is the other issue I have with Struts in general. How many damn XML and other dependent files do I have to create to do an online form with validation? As the FrameWork evolves, the files are spreading and getting so complex to do something simple is a major undertaking...
Some people are proponents of moving as much into XML as possible. Therefore you end up with things such as the Validator framework and DynaActionForms. On the other hand, the components are still there for you to do the same things without using XML, such as using regular ActionForms. Struts is flexible. Simply use the parts of Struts that you like, don't use the parts you don't.