Monday, July 16, 2007

Validation Application Block - The very start of a new journey

Although LINQ made a huge impression on me at the Tampa Code Camp I do not have Visual Studio 2008 yet so today I worked on the other groundbreaking concept I saw at Code Camp, the Enterprise Library Validation Application Block (VAB). The concept of this project is to provide a consistent way to validate data and relocate all of the validation off of Windows or ASPX screens and place it in the business logic layer. This is accomplished through declarative programming and the addition of validation attributes on properties within the business objects. The implementation of this technique is codeless for all of the validations provided within the VAB because all of the validation is performed by the VAB framework. Of course the VAB is extensible so you can write your own validations as well. Additionally, the inclusion of "rule sets" means that data can be validated using multiple rule sets. Thus, for a company like mine where we write 1 product for many customers we can have a core validation set and each of our customers can add their own custom validators. The amazing part is that validators can be written within code (obviously by developers) but also in config files (potentially by our clients). Obviously, a lot of smart people put this application block together.

Check out this quick video by C# MVP David Hayden and hopefully you will be as excited about the promise of this technology as I am.

No comments: