Shared (Static) Class in VB.net

G

Guest

I'm new to .Net and all it entails :-

I'm trying to design a solution that has a group of business rule objects (per session) to do validation on rows from a datagrid. I want to have "static" classes so the web app can just call the class methods to validate the data...using the builtin validators doesn't seem to be a good solution due to the fact that the business rules will be complex and require all the logic to be centrally located

Any tips on how to accomplish this

I started by defining an IBusinessRule interface and want to create a class for each rule using the interface..

Thanks
-Will
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

If the implementation is different, the interface is a good thing. If the
implementation is the same, use an abstract class instead, so you do not
have to write the same code over and over.

Static methods are great for helper type functions. I would not use them to
kludge up a class.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************************************************
Think outside the box!
***************************************************************
will said:
I'm new to .Net and all it entails :)

I'm trying to design a solution that has a group of business rule objects
(per session) to do validation on rows from a datagrid. I want to have
"static" classes so the web app can just call the class methods to validate
the data...using the builtin validators doesn't seem to be a good solution
due to the fact that the business rules will be complex and require all the
logic to be centrally located.
Any tips on how to accomplish this?

I started by defining an IBusinessRule interface and want to create a
class for each rule using the interface...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top