Validation Best Practices? 2007-11-06 - By Joachim Ansorg
Back Tom, I've read this thread with great interest.
Currently I'm thinking about the validation problem as well. I looked at springmodule's Bean validation framework. (https://springmodules.dev.java.net/docs/reference/0.8/html/validation.html #beanValidator). Looks quite interesting to me. Does somebody have any experience using it together with Struts 2?
Do you have any experience now using validators in seperate classes? If yes, which validation framework did you choose and what is you opinion now after using this approach?
Thanks for any hints, Joachim > I think drools would be way overkill for simple validation. Not only would > there be a high learning curve, I don't think it would handle the most > involved cases. I really think we need to do Java by default. > > The reason I included a way to autofind the validation class is to mimic how > the existing xml validation automatically works. I'm OK with doing > delegation to another validator in the validate() method of the action, I > just thought it might be nice to have convention over explicit delegation, > but I'm open to other ideas. > > I would definitely use another validation API under the hood. My idea would > be to have a standard set of convenience validation methods in the super > class that defers to either commons validation or Spring's validation > support. I'd like the validation code to be as concise as possible, an API > similar to Spring's valang might work--except in java code instead of a > custom language. > > If others would find this kind of thing useful, I think it would be useful > to create a googlecode project to begin a proof of concept. Work through > what the API would look like because I think it would be a great alternative > to the validation framework that's in place now. (And as I stated before, I > would love to use this both at the UI level and at the business > logic/component level) > Tom >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|