Static Classes in Web Applications

  • Thread starter Thread starter thomson
  • Start date Start date
T

thomson

Hi All,
Can any one tell me the demerits of using static classes in
Web Application,what is the scope of this kind of class


Thanks in Advance

Thomson
 
if you think about static classes like the Math class you can use it in all
your Web application if you need to. The same idea is for a Static class
that you can develop. There are no demerits for this...

In general i use static class for utilitary clasess like getting a
personalized Date Format, because I don't want to be creating instances of
this classes for a simple activity.

Gustavo.
 
The application scope. Meaning multiple user sessions will be accessing the
same data.
 
some gotcha's though when using static classes and variables in ASP.net
http://onwuka.blogspot.com/2006/01/static-varibles-in-aspnet_28.html


Eliyahu Goldin said:
The application scope. Meaning multiple user sessions will be accessing
the same data.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


thomson said:
Hi All,
Can any one tell me the demerits of using static classes in
Web Application,what is the scope of this kind of class


Thanks in Advance

Thomson
 
Yeah application scope is Multiple users accessing the application, ok,
when i call a page in that i called a static class, so u trigger the
class to be in the heap [guess], so it wont be affected by any garbage.
So when another user access the same application whether we are
accessing the same


Onwuka said:
some gotcha's though when using static classes and variables in ASP.net
http://onwuka.blogspot.com/2006/01/static-varibles-in-aspnet_28.html


Eliyahu Goldin said:
The application scope. Meaning multiple user sessions will be accessing
the same data.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


thomson said:
Hi All,
Can any one tell me the demerits of using static classes in
Web Application,what is the scope of this kind of class


Thanks in Advance

Thomson
 
Back
Top