.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 24th, 2005, 12:25 PM
sanathdw sanathdw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 sanathdw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 2 sec
Reputation Power: 0
Exclamation implecations of using static functions in a ASP.NET application

What are the implecations of using static functions in a ASP.NET application ? and what are the best practices of doing so ?

1. Is acess to static functions synchronized in a ASP.NET app. i.e. How are multiple requests handeled ?
2. Why should we use static functions, is there an advantage other than the lesser cost of instantiating an object of the type in which that function resides?

For example



public class X
{
public static a()
{
some_variable i;
create_object Z();
// do something
}

public static c()
{
Y y = new Y();
y.b();
}

}

public class Y()
{
public b()
{
X.a();
}
}


3. What happens when I get multiple requests to access X.a() from Y.b() ? Will it be a performance problem ? Will variables created in a static function by one request get overridden by another ?
4. Should static functions only call other static functions? is what I have done in X.c() valid ?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > implecations of using static functions in a ASP.NET application


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway