On 21 Jul 2006 15:03:43 -0000, Kevin O.
[email protected] wrote:
code as well as on the client.
It’s certainly not without its problems, but it’s a pretty cool system
that maybe could be learned from.
This approach will fail when you need to do custom validations. That
would require you to write a client side and server side validation and
then make sure they both work the same. Certainly not very DRY.
Ajax could be used to ‘enhance’ the user experience by flagging
validation problems before the form is submitted.
Yes and no. If you write a custom “validation” then you will have to
be un-DRY, like you said. However, if you write a custom “validator”
validators then it’s nearly DRY. You could argue that creating a
server-side piece is duplicating work.
Usually, however, the way it works out is that the kinds of
validations where you would be writing custom code need something else
from the server (like a database hit), so you simply skip the
Please don’t take this as me thinking that Struts is a panacea. I’ve
seen some horrifying Struts abuses involving validations and custom