Hi, I have seen that before, but what I am trying to avoid is having the rules hard coded into the code. It means a code change and recompile to every rule change.I guess I am looking for xml configuration. I know there is http://www.agilepartner.net/oss/nxbre/. I think it is written in .NET 1.1 (we are using 2.0) and may seem a bit heavy for what I am trying to achieve. [EMAIL PROTECTED]
> Date: Mon, 12 Feb 2007 12:05:31 -0500> From: [EMAIL PROTECTED]> Subject: Re: > [ADVANCED-DOTNET] Business Rules> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > > you may want to look here:> http://www.lhotka.net/cslanet/download20.aspx> > > and poke around the base classes to see how the validations are setup....i> > really like it.> > basically each object keeps it's own internal list of > "Broken Rules", a> public property "IsValid" returns "BrokenRules.Count =0"> > > in all your property Set statments, test for the rule being broken and if > it> is broken add it to the internal list, if the rule is not broken, make > sure> it's not in the internal list.> > there's a BrokenRule struct in there > too that helps expose the validation> message & other error info to calling > code.> > > > -----Original Message-----> From: Discussion of advanced .NET > topics.> [mailto:[EMAIL PROTECTED] Behalf Of Paul Cowan> Sent: Monday, > February 12, 2007 12:01 PM> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> Subject: > [ADVANCED-DOTNET] Business Rules> > > Hi,> Not sure if everyone has forgiven > me for my last rant which was pretty wrong> :-) but I am looking for some > advice to what I guess is a pretty common> problem.We are developing an > application that will have a lot of business> rules that will change quite a > lot during development. We have a domain> model with aggregation used quite a > lot. Now the most advanced I have ever> got with this in the past is to have > my POCO implement an IValidate> interface and have the rules hard-coded into > a validate method. As I am> sure you will agree this is a very inflexible > approach.> > Does anyone know a better way of approaching this time honoured > problem?> Cheers> Paul> ===================================> This list is > hosted by DevelopMentorĀ® http://www.develop.com> > View archives and manage > your subscription(s) at http://discuss.develop.com> > > ===================================> This list is hosted by DevelopMentorĀ® > http://www.develop.com> > View archives and manage your subscription(s) at > http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com