Claude,

I really cannot say I notice much overhead, it is very quick for me.
If your catering for people on slow dialup connections then ANT server side
validation would be slow, so are you suggesting DO NOT DO SERVER SIDE
VALIDATION if it causes any overhead?

It is quicker for one very simple reason.
When you do server side validation, you are submitting your entire form, and
then loading an entire page in the response which must be rendered, this
takes a lot longer than a small bit of data being transmitted over ajax. Do
the math, work out your page size  in KB and then compare it to the data you
would send and receive via AJAX.

The reason for two routines if you do separate client and server validation
is because Server Side validation would need to be written in CFML (this
runs on the server), and client side validation would be written in
JavaScript (this runs on the client).
You cannot execute CFML code on the clients, and you cannot execute
Javascript serverside.

RUss

-----Original Message-----
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: 16 October 2006 13:41
To: CF-Talk
Subject: Re: Form Validation Custom Tag

 >>As an AJAX call only sends/returns a very small amount of data, it is
very quick,

The overhead is not caused by the amount of data, but just by the operation
of calling the server. And also the fact that the server now has the
overhead instead of the user.

 >>and is still quicker than server side only validation if the client has
Javascript enabled.

How could it be ?
The server side validation will be done by the template called by the form.
This template has to be executed anyway to process the form, so even if it
also does validation first, it will still be more efficient than calling two
templates, one for validation, the otheone for procesing the data.

 >>It means you do not have to write two separate validation routines,

Why two routines? What was validated on client side must not be revalidated
on server. Things that should be validated on server are not the same.

--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED]) Thanks.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256878
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