Friday, June 20, 2008

Cruxade's Validation Library - in action

The validation library has now been incorporated into extendContainer.js, useful for control validation within a form. The development code can be downloaded and tested using the instructions at http://cruxade.freefeathers.org/Repo/

Once you've successfully installed cruxade into firefox, you may see the validation library in action by loading the xul page at chrome://cruxade/content/validation.xul

Keep pouring in your ideas. The improvement of this library will greatly benefit ffehr (http://ffehr.freefeathers.org).


;-)

2 comments:

Unknown said...

Natsky,

As I understand it, you're doing validation on the client side(?) From my experience though, it's better to do this _solely_ on the server side for a number of reasons:

1. Client side validation is easily bypassed no matter how much we deny the possibility that our users may be capable of doing so,

2. Distributing the business logic between the client and server side is bad design. All business logic should be located in one place (the model) if we want to keep the code maintainable.

I understand though that strictly adhering to the rule is going to affect the responsiveness of the app (e.g. users expect that app to provide feedback as soon as he/she types a bad value). In that case, a protocol should instead be established between the client and the server so that the server can inform the client about the validations at run time (not design time).

nbjayme said...

hello mark,

thanks for sharing your thought on the subject.

Yes, there are disadvantages in doing validation on the client side. As you know, cruxade is not only meant to work _solely_ for server-side app. ffehr, for example, is a standalone application and validation is needed on the same app as well.

Mozilla, and I guess other browsers, have a technology called signed-scripts ... that is signing your script with a key.... I still have yet to explore in that area. This feature may well protect the integrity of the Xulrunner / mozilla-based application.

NBjayme