J
Joe Fallon
In another post Kevin Spencer stated: "one should be careful of using static
fields, properties, and methods, by understanding what the implications of
such are (e.g. locking static variables when changing because they are not
thread-safe)."
Can someone please elaborate on the pros and cons of using static methods?
(In VB they are called Shared methods.) The MS DAAB uses Shared methods.
This means that all Data Access calls go through this block of code without
instantiating an instance. I assumed that this would be a highly scalable
solution. Is this assumption correct? Or are there drawbacks to using shared
methods that reduce the scalability? Do multiple users ever "step on each
other"? For example, can UserA end up with UserB's Datareader?
Appreciate any advice.
fields, properties, and methods, by understanding what the implications of
such are (e.g. locking static variables when changing because they are not
thread-safe)."
Can someone please elaborate on the pros and cons of using static methods?
(In VB they are called Shared methods.) The MS DAAB uses Shared methods.
This means that all Data Access calls go through this block of code without
instantiating an instance. I assumed that this would be a highly scalable
solution. Is this assumption correct? Or are there drawbacks to using shared
methods that reduce the scalability? Do multiple users ever "step on each
other"? For example, can UserA end up with UserB's Datareader?
Appreciate any advice.