----- Original Message ----- From: "David Graham" <[EMAIL PROTECTED]> To: "Struts Developers List" <[EMAIL PROTECTED]> Sent: Tuesday, November 16, 2004 12:22 AM Subject: Re: The Future of Struts Validation?
-- snip > The fact that there is no Validator interface is one of the unique > strengths of Commons Validator. You don't need to implement anything, > just tell the framework the method name and parameters and you're done. I disagree. While being able to specify the arbiter of the validation to be any method of any Object does allow infinte levels of flexibility, it also introduces much fragility and complexity into the configuration of the validator. IMO it would be beter to create a simple class that implements a Validator interface. If this class wants to hand off to an existing validation mechanism then it can do so, in which case it gets the benefit of compile time type checking. If it wants to handle the validation itself then we get a tightly focussed class which is a very good idea IMHO. Meanwhile the validation configuration has become simpler as only a factory needs to be specified. The implementation of the validation mechanism has also become simpler as we no longer need to rely on reflection. The out of the box validations have also become simpler because now there is one per class. And we haven't really lost any flexibility. All existing methods of validation are still accessible, you just need to implement a simple interface to access them, and if you are configuring a validator to points to existing validation points then this is trivial exercise for you. William --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]