Hi,

I'm about to finish my work on the client validation and have faced with a design dilemma here.

There are two method getJsFunction() and getParams() that must be implemented by extended validators so which design seem more convenient?

* Using an IClientSideValidator which will be implemented by extended validators marking them capable of doing validation at client side.

or

* Using ValidatorBase class which is the parent of all extended validator and declare the two methods as abstract.

I've chosen the abstract class instead of the validator although all the design patterns books say favor composition over inheritance:) Because the plan is to make all the extended validators capable of client side.

As a reminder of the issue;

http://www.irian.at/cagatay-validation-sandbox/home.jsf

Regards,

Cagatay

Reply via email to