Hi & Happy Holidays!
We have a Smart Client business app, and, would like to keep the
validation rules on the server side of the SOA.
However, as a performance benefit (i.e. save an unnecessary server
round trip), and user experience benefit, the "on the fly" validation
capability of VAB / Validation Provider / ErrorProvider on the UI
works very well, and we would like to get the benefit of this as well.
Although we can duplicate the rule configs on both Client and Server,
it would be 'nicer' if we can keep to the one common set, i.e. we
would like to keep our entity validation rules in our Server
app.config, but would like to expose a rules 'service' allowing
clients to retrieve these rules (and cache them) for the purpose of
'early / on the fly' validation.
Which brings the question : Is there a simple way to dynamically set
the Validation "rule" store (on the client) to a location other than
app.config, or will we need to hack the file?
This is probably a common scenario with a Smart Client / VAB
combination?
Thanks in Advance
Regards
Stuart
NonNB - 09 Jan 2008 07:26 GMT
FYI - EntLib Contrib Sep 2007 has
EntLibContrib.Validation.ExternallyConfiguredObjectValidator which
allows specification.
http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=VAB%20Contributions&A
NCHOR#ExternallyConfigurableObjectValidator
However, did need to make minor changes to
Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms
ValidationProvider.cs in order to use this in the UI
Another good reason to split out the Validation Rulesets on a multi
person project is to prevent dev contention for app / web.config