Wicked ASP.NET: Peter Blum’s Professional Validation and More
I have been a self employed developer for a little over 2 years and in that time have taught myself a number of rules. My Component rule is pretty common and goes as follows.
“If X functionality is needed, determine the time needed to develop minimal functionality and multiply that number of hours against my bill rate. If purchasing a quality component that does far more than the minimum is less than my TIME x BILLING number then purchase the component”
So needless to say I have done the component evaluation/purchasing thing a number of times; I find it better to meet and exceed client expectations than to get a warm fuzzy and show my wife the cool component I rolled.
I have always loved the validation components of ASP.NET but at the same time knew there was room for improvement. I tried a number of things on my own including some tricks where I turn the validation summary into links that set the focus on the control in question. Nothing special to this, just a little spice to the user interface.
Well, recently I was handed a project with a ridiculous deadline and virtually no specification (typical gig). One of the unique features of this site was the impressive level of traffic it would see; we are talking 10,000+ users per day at times. I wanted to really hit a home run with this one so I started researching components I could use that would make the site look and work like my client deserved. The site needed full cross browser support so using the ASP.NET controls at the client side was a no go. I had to find a better solution.
For the sake of making a long story short and getting to the point of this post I ran across a replacement for the ASP.NET validation controls from some guy named Peter Blum. His site promised his package had 22 controls as opposed to Microsoft’s 5. The site also told me that the controls worked on IE, IE/Mac, Netscape 6+, Mozilla, Opera 7 and Safari. At this point I am intrigued and after a few minutes of looking at demos and reading the finer details I was collecting a small pool of drool on the floor.
The price was great at only 100 dollars and I will have to say that in my entire software development career and the purchasing of dozens of components I have never got such value for just 100 dollars. After a few hours my eyebrows were tired from being raised so much and chin was pretty bruised up from banging against the floor.
I could enumerate for you the controls in the suite but I will go ahead and make a blanket statement here which for me has been true to this point; he has covered all the bases. You have your typical required text validator, data type validator, regex, range, yada, yada, yada. Peter then goes off the reservation with validators specifically tailored to lists, specialized comparison validators, character, text length, selected index, check state, word count and others! Oh yeah, and then there is the crown prince of all validators, the multiple condition validator.
If you have ever used the ASP.NET validation controls you have ran across the annoyance of needing to add a required text and data type checking controls for the same control. This can get ever nastier with more complex scenarios but that is the most common. Peter solved this with the multiple condition validator which lets you apply the validation logic of any of the validators inside one host. You can also span multiple controls with multiple conditions all with one multi condition validation control. DING DING DING, we have a winner!
These controls also contain an enabler condition that allows you to turn on/off the control based on a condition (ie; don’t validate X text box if the Y check box is not checked.) Also contained is the ability to select the client side event that will fire the validation (onchange or onsubmit) and each control defines a formatter for the look which you can extend and make work as you wish.
There are a number of other features that I have not even explored in depth yet including a wicked replacement for the validation summary control.
Beyond the value of the controls there is one other major factor that makes these controls stand above all the others…the unreal amount of documentation. This tends to be the missing link for most control developers but I think Peter realized this and made sure no one would ever have that complaint against Professional Validation and more. It is almost biblical in nature, ‘War and Peace’ of developer documentation. Don’t print it, you’d piss off an environmentalist.
So needless to say, this one is good. My client was rather happy and the controls work great. Thank you Peter Blum.