|
From: Matt R. <li...@ra...> - 2005-05-09 13:06:55
|
Hey guys, I have the following section in one of my Spring Live chapters. I=20 haven't seen much activity on the "declarative validation" front in=20 Spring MVC - so I want to make sure this is still valid. Thanks, Matt Spring=92s Future Declarative Validation Framework At the time of this writing, Commons Validator is the only declarative=20= validation framework that's been released to support Spring MVC. There=20= is another declarative validator (the Valang Validator) that's part of=20= the Spring Modules project, but it hasn't been released yet. As far as=20= declarative validation being part of Spring - there are plans for it,=20 but it hasn't been developed yet. I asked Keith Donald to provide me=20 with a few details about it, and here are the key=20 features/differentiators he sent me: =95 A simple, consistent interface for defining new validation rules=20= (rule providers simply implement a single "boolean test(argument)"=20 method). =95 Support for bean property expressions (for example, minProperty = must=20 be less than maxProperty). The property access strategy will be=20 pluggable and not limited to java beans (for example, allowing=20 map-backed storage, or buffered "form objects" on the rich client side=20= of the house). =95 Support for complex nested expressions (and/or/not), and all=20 relational operators (>, >=3D, <, <=3D, !=3D, =3D=3D). =95 Support for applying different sets of rules based on context or=20= use-case. =95 A reporting subsystem capable of iterating over rule structures,=20= performing validation, and capturing/generating error message results.=20= This allows you to assemble complex rules on-the-fly without having to=20= hard code a lot of static messages; the reporter is capable of=20 generating rule messages from the underlying structures automatically. =95 Report field typing hints (the rules associated with a field to = let=20 the user know what they're expected to type). =95 Integration with Spring Rich Client Platform (RCP) and Spring = MVC=20 environments. |