struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith <keithbaconstr...@yahoo.com>
Subject Re: Datetime validation taglib for struts?
Date Fri, 15 Feb 2002 10:22:41 GMT
I don't have proof but it seems to me most validation
errors are not simple numeric/date format problems. So attempting
to catch such errors early on saves very little.
I validate for correct type in my business logic along with the other
validation & don't bother anywhere else. My validation accepts input as String
or numeric/date type so it can service any sort of GUI. Then my action & form
classes for struts deal in strings & their code is very simple.
All validation is in 1 place & there is less code overall.

When to validate client side?
If a page is used very highly (maybe 20,000 times a day, maybe even more than
that) there comes a point where the reduced server loading by handling format
errors on the client is worth it.

Maybe also you have research that indicates a significant % of clients have
been upset because they typed a date incorrectly & that was the only validation
error & they had to wait 3 seconds for a response from the server.

If there is no cost justification for code - leave it out! That's if you want
code that runs for years & is cheap to maintain, which is what we should be
aiming for these days.
Please correct me if I'm wrong here.


--- Mark Woon <morpheus@SMI.Stanford.EDU> wrote:
> theron.kousek@webmd.net wrote:
> 
> > Thanks Mark for your answer.
> >
> > I was just curious how most others here choose "when" to perform things
> > like date/numeric validation?
> 
> You would always want to perform in server-side, once you've received the
> user's input, regardless of whether you
> have JS validation since JS could be turned off.
> 
> -Mark
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message