> Are you doing any real load testing?

No... just basing my assumptions on the fact that my client's sites
only get probably 300-400 hits per day altogether.  It's sad, but I
can get them to utilize their sites well.

Most of the traffic on the server will probably come in the form of
CMS usage built into the sites for my clients.

I see what you're saying below about the simplicity of client-side
validation instead of a hybrid system.  And the slow-downs I may
experience could well change my mind about the hybrid.

But I've *always* performed *only* server-side, CF validation up to this
point, after submitted an entire form, and the feedback from CF is
virtually instantaneous.  I'm sure it's slower that pure JS, client-side...
but
if it's not so significantly slower to bother the user, then I don't see a
problem.

And it seems as if you're comparing apples to oranges when looking at
how much code it takes to create client-side only validation, versus a
hybrid system.
You've got to account for the CF server-side coding, as well.  And creating
a system
with both client-side and server-side validation that sends validation
messages back
to a user seems much more complicated.  With a hybrid system, I only have
one
system to maintain, not two...

And, as I said, at *this* point, stress on the server is not an issue...

Rick

-----Original Message-----
From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 16, 2007 7:45 PM
To: CF-Talk
Subject: RE: Client-side validation or Server-side Validation?

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




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

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

Reply via email to