Thursday, August 9

Validation and Agile Principles

I had earlier posted a javascript version of the
trim method, since a prebuilt one is not available.
But while watching Peter blum's DNRTV episode,
he showed that a prebuilt Trim method is available only when the method is used as (set as)a client side validator of the customvalidato control.

txtVal .value = ValidatorTrim(txtVal.value);


To hook up an additional control to the
ControlTovalidate use:

ValidatorHookupControlID("secondcontrolClientID",
"clientIDOfTheCustomValidator");

All credit goes to Peter Blum and DnrTV, blogging only for future reference purposes.

Also, ValidatorEnable(clientID) to enable/disable validators on the client side.

What I find funny is that these functions don't find a mention in the Professional series of
asp.net not have I come across these in forums/blogs I browsed up till now. I wonder how one is supposed to find out helpful things like these.


Also here is a list of Agile principles mentioned by Venkat on DrntV episode on agile design

DRY - Don't repeat yourself
YAGNI - You aren't gonna need it
OCP - Open Closed Principle
LSP - Liskov's substitution principle
DIP - Dependency inversion principle ( used in creating enumerators for various classes such as ArrayList, queue...)


Will expand on these as time goes.

Amazing shows, hail dnrtv.

Labels: , ,


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]