[Catalyst] RFC: HTML::Widget / Ajax / Catalyst

Brandon Black blblack at gmail.com
Thu May 4 22:59:54 CEST 2006


On 5/4/06, Nilson Santos Figueiredo Junior <acid06 at gmail.com> wrote:
> On 5/4/06, Sebastian Riedel <sri at oook.de> wrote:
> > That will never work, there are always callback constraints and
> > things like that.
> > I'd prefer to use Ajax and validate server side using the original
> > Perl constraints.
>
> How about doing whatever is possible in plain JavaScript and the
> falling back to server-side validation through Ajax? There could also
> be a second fallback to pure old-style server-side validation.
>

Even with client-side validation, in most cases you still want
server-side validation too, especially if the validation has security
implications (as anyone can modify/bypass your client-side JS and send
direct responses to the server themselves).

Client-side pre-validation (perhaps that's a better term for it?) of
the same thing the server would validate anyways (or at least some
subset thereof) is an efficiency and interactivity win, but nobody
likes to do the extra code for it.  But if you can generate validation
rules for the server-side that can be mechanically translated to JS
validation for your HTML (or Dojo) Widgets as well without much
thought on the dev's part, it's a Good Thing imho.

-- Brandon



More information about the Catalyst mailing list