Claude,

When a user turns off _javascript_, it's their preference, and very much
your problem.  If you're using at as the sole means to make sure a
string is a string and a number is a number, you're likely to begin
getting emails about users encountering ColdFusion errors.

>I can write code in _javascript_ to verify whatever I want

Good, keep doing it, and save people a round-trip to the server.  But
don't trust that your _javascript_ has validated the data coming to you,
and check it again on the server once it passes your script.

>But most of the validation can be and SHOULD be done client side on
the contrary.

I disagree strongly.  I think validation should be done on the client
whenever possible, but should always be backed up by
equally-if-not-more strong validation on the server and the database.
On the server in case of client-side disabling of validation.  For the
database, it's doubleplus likely that you'll have have other ways of
interacting with data (straight SQL, another app, etc), and you'll
need validation there to make sure everybody plays by the same rules.

> Many sites using server side validation will just tell you there is an error and just redisplay the empty form.

Well, many developers should learn to default their form values
properly so that you see an error message as well as what was entered
before the submit.

>If verification is done server side, the server must return the user
to the form with the field initialized with the values the user
already filled in, even if there are errors.

This is not hard, and only a lazy developer would not do this.  See
previous comment.

-joe

--
For Tabs, Trees, and more, use the jComponents:
http://clearsoftware.net/clear/?template=downloads.jComponents
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to