|
Posted by Katana on 05/12/05 12:50
Hello Vicente,
> Nice to see you around, I stoped following your devs once I signed of
> from phpedit network.
I'm still around :)
> As I said on prior posts, that ANY is what worries me: to me and most
> of my customers is between 10-20% of browsers and they prefer a
> solution that works the same way for every user, than switching
> systems.
I think I need to define what goal formsess was developed for: it was
basically a forms validation & persistence lib. I was always doing the
same thing:
- write a form with JS validation
- check every field on server side:
- store an error message if the field has an error
- keep the value if there is no error
- redirect to the form if data had errors
- show error messages and restore correct values
That's exactly what formsess does...
You write your form in an almost usual way (fs:input instead of
input), you add your validation (either with fs: template tags or from
the script _ new in 2.2.0).
Client side validation is generated, and server side validation
callbacks are stored. Even if there are JS errors, server side
validation will ALWAYS be processed, whatever happens.
I think this is a totally secure approach :)
Regarding double work, there's none... the same template/script code
generates both JS & Server Side validation. Final ^^
JS validation is a bonus, as far as I'm concerned, but a BIG bonus for
both the customer and your server.
And as another bonus, i'm currently testing a feature I consider cool
stuff: XML HTTP validation. If data can't be validated on client side
(e.g. check if a login exists, or if a date for a booking is
available), formsess can validate stuff "from client side" with a
single trip to the server using xml http. The relevant fields are sent
to the server using GET, and the appropriate answer is fetched,
displaying an error message on client side if required.
What's nice is that the same callback function is used for both XML
HTTP (JS) validation and server side validation. Reusability :)
Well, that's it. I hope you see my point now.
Bertrand / Katana
Navigation:
[Reply to this message]
|