Silverlight 2 Beta 2 Declarative Data Validation Presentation – Charlotte Developers Guild

July 21, 2008

SilverlightDBOV

I was asked by the Charlotte Developers Guild to give one last (hopefully not) presentation for our monthly meeting before moving to Redmond in 10 days.  Once in Redmond, I’ll be going on a cruise to Alaska and then joining the Cider Team. 

So on Tuesday, 22 July 2008 I’m privileged to be presenting on Silverlight 2 Beta 2.  I had a nice surprise today.  Rob ‘Zelter Zone’ Zelt called me and said he is brining some great friends including Sue Googe from Raleigh, NC to the Guild meeting.  Thanks Rob! 

I’ve always loved participating in our Guild events and will miss everyone there. 

It is my intention to keep in touch with my developer friends in the Carolina’s and continue to attend the annual and biannual Code Camps. 

My sincere thanks to the Charlotte Guild for their support and encouragement over the years, you folks are the best.

Full Article

I have a full article with several videos explaining the demo application and Core library that I will post Wednesday or Thursday this week.  Please check back and read about this code.

Core Library Features

Here are some of the features of the declarative data validation library included in this download.

  • Shared and instance rule management, invocation and broken rule reporting. This includes multiple ruleset capabilities.
  • Rules are applied using attributes or in code.
  • Rich set of validation rules.
  • TextBox entry reformatting based on attribute applied to the property.
  • Error reporting at the property and object level. Errors can be extracted as either a string or generic list.
  • Is dirty tracking.
  • Very simplified method for setter’s to call that encapsulates the validation, event raising and property text case logic.
  • Audit message creation based on decorated properties. Message can be a string or collection of property name value pairs.
  • Message creation for the entire class. Message can be a string or collection of property name value pairs.
  • Change notification for all entity properties.
  • Changing notification for all entity properties.
  • Intelligent change notification for the IDataErrorInfo.Error property. This permits the Error property to be data bound and always be reported correctly in the UI.
  • Rich set of overridable methods that provide the deriving classes flexibility in programming business logic if required.
  • Small footprint 57KB (release build).

Presentation Source Code

I’m posting this code for the attendees of the presentation so that they won’t have to wait until the article is published.  If you didn’t attend the presentation, you may want to wait for the article and videos.  Your choice.

This library requires Visual Studio 2008 and the Silverlight 2 Beta 2 SDK.  Check out Scott Gu’s blog for the installation procedure.  I’m also using the Expression Blend 2.5 June Preview.  (Not required)

FYI:  I have not yet installed or tested this code with Visual Studio 2008 SP1 Beta or the .NET 3.5 SP1 Beta.

After downloading the source code you MUST change the file extension from .zip.DOC to .zip. This is a requirement of WordPress.com.

Download Presentation Source 1.4MB

The first time you open the solution, be sure to set the start page in the web project to: Silverlight2Beta2DataBindingSampleTestPage.aspx.  When transferring web solutions from one computer to another, the start page needs to be reset.  If you forget this step, your browser will display an empty page when you run the solution.

Have a great day.

Just a grain of sand on the worlds beaches.