I'm implementing a data access layer for the project I'm currently working on. In order to provide basic validation these classes are each keeping track of the schemas for each of their fields (FieldName, Type, Size, Nullable).
I'm considering the use of static schemas so all this information doesn't have to be created for each and every instance of a record, however I've been told to avoid static members whenever possible. Why shouldn't I use static members, what are my alternatives, and what makes these alternatives better?
It seems to me avoiding the use of static members is wasting a very powerful and convenient feature, one that most programming languages seem to allow.
Thanks!
I'm considering the use of static schemas so all this information doesn't have to be created for each and every instance of a record, however I've been told to avoid static members whenever possible. Why shouldn't I use static members, what are my alternatives, and what makes these alternatives better?
It seems to me avoiding the use of static members is wasting a very powerful and convenient feature, one that most programming languages seem to allow.
Thanks!