Bill Blogs in C#

Bill Wagner discusses C#, LINQ, and other items of interest

Yet another reader question
From an older article that is still online, comparing my approach to another author's.

Yet another reader question (from an older article online at fawcette.com)

I just read your VS Magazine article (see links below) regarding data-driven client validation and I had sort of a general question for you.  How does your approach differ from the approach taken by Enrico Sabbadin in the March 2004 issue of VSM (see links below)?  Is his technique one of the data distribution methods that you outlined in Table 1 of your article?  Do you have an opinion on his techniques?  I am looking at this from the perspective of how best to implement business objects within our enterprise.  Any advice you can give would be highly appreciated.    

Enrico’s algorithms are a form of the validation we proposed in the first line of the table in our article. (I want to remind everyone that the article referenced was co-authored by Tony Surma, whose insight was invaluable. If memory serves correctly, he provided all the information in the table referenced.) Enrico’s solution used code to handle the validation events at the client side. He used the same events that we did, but his validators were using rules that were baked into the code. We tried to provide generic code for classes of rules that would be common in business applications. Then, a controller would read an XML configuration file (using any of the methods shown in our article) and create the proper objects using the data defined in the objects.

The main difference between Enrico’s approach and ours was that we built in some capabilities to modify the business rules by modifying the data file that drove them. This extra capability comes with increased complexity. So I would recommend our solutions only when it’s expected that such changes are likely in the future.



The article by Tony Surma and me
Build Data-Driven Client Validation
The article by Enrico Sabbadin
Use DataSets as Business Objects
Published Sun, Jun 12 2005 10:10 PM by wwagner
Filed under: ,