Rick,

>> You're adding a lot of complexity
>
>Less complexity as I see it...

Trust me, you're adding more. What happens if the AJAX request never
returns? What are you going to do? HTTP requests are not perfect and they do
from time to time fail. If you're validating during an onblur event--which I
know at one time you were--and a user starts tabbing through the fields, and
HTTP request be triggered off for each blur event. This is a lot of undo
traffic. It might work just dandy when you're test a single form and you're
the only person using it, but if you get any kind of traffic to your
site--it's going to cause issues.

The bottom line is, I had a choice between no client-side validation and
using AJAX-style validation, I'd clearly go w/no client-side validation.
Fortunately, there are so many tools out there that basically do all the
work for you.

>> lot of load to your server that's unnecessary
>
>Doesn't seem to have any issue handling it so far.
>(Of course that could change if I pursue this to a greater degree.)
>But like I've stated before, *all* validation I've performed up to this
>point has been by using CF.  Never used client-side validation before.

Are you doing any real load testing? Running something locally w/no load is
quite different that in most real world use cases.

>> Using Joern's jQuery Form validation, you should be able to apply basic
>> validation to your form in minutes.
>
>Been there, done that.  But then you have to add validation for the same
>data
>on the server-side.  I don't see that as any more beneficial to the server.

Because the client does have to talk to the server for each and every error.
That's a lot less http requests to your site. Also, the user doesn't have to
wait for the server to respond--the messages will appear instantly.

I mean there's not a lot of coding involved in:

$(document).ready({
        $("#yourForm").validate({
                rules:{
                        name: {required: true},
                        email: {required: true, email: true}
                }
        });
});

I mean I just validate a form w/all client-side validation and made sure
that the "name" field and "email" field are both required and that the
e-mail field has to be an valid e-mail address.

I'd put money on it that it took you a lot more time to try and get your
AJAX-style client-side validation working correctly. I only needed to write
those 8 lines of code. 

My code doesn't require any round tripping to the server either.

This isn't rocket science and it isn't hard. You're actually making it much
more difficult to solve than it is.

-Dan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275484
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to