Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Rules Where?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Business Rules Where?
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01014676
Message ID:
01014676
Views:
69
The MM Framework encourages you to create Busines Rule objects for your Business Objects, which you can do by subclassing Kevin's mmBusinessRule object. This is a great idea and I am all for keeping the business rules in one logical location like this.

I ran into a problem where I used an object's business rules to verify that data entered by the user on a Web Form was populated and formatted correctly. Unfortunately it looks like the data from the web page was inserted into the dataset before the business rules methods fired and I got Sql errors because the data violated the rules.

I know that I could solve this problem by adding .Net Validation controls to the web page to validate the data before it gets added to the dataset. This would also increase performance by validating the data on the client-side. But the big question is, how much validation do you put on the web page and how much do you put in the business objects??? The whole point of OOP is to reuse code, not duplicate it.
Next
Reply
Map
View

Click here to load this message in the networking platform