Ask a Question related to ASP.NET General, Design and Development.
-
Jerry #1
Please share your opinion with me.
I am sorry for posting this message again. But I really want to hear more
responses.
---
My company is designing a new ASP.Net web application. Becasuse of the
concern of abusing Session variable(will consume memory), our team is going
to use following apporach to avoid it. Some of team members think it is
unnecessary and don't agree with this approach. I would like to hear your
oppinion about this. Or if you use any of process to limit the developers
using session variables in the ASP web application. Thank you in advance.
Following is our proposal process.
1. Add the session variable names to the webconfig file. Only one person in
the team( 7 developers) is allowed to add it. So if other developers in the
team need to add new session variable, they need to ask that person to add
it in the Webconfig file first.
2. Create a wrapper class for getting and setting the session variable
values. This wrapper class will check if the session variable exists in the
webconfig file. If not, error returns. Developers ,instead of calling
Session object directly, will call the wrapper class method.
Regard
Jerry
Jerry Guest
-
Share your opinion on Adobe Contribute for a chance towin $500USD!
Share your opinion on Adobe Contribute for a chance to win one of five $100USD gift checks or one $500USD gift check! Take the survey now:... -
Opinion
I need some opinions. Here is the situation: I have a DataGrid with TemplateColumns. To display my values, I use the ASP code in the HTML. So... -
In My Humble Opinion...
"Chesucat" <chesucat@freeshell.org> wrote in message news:Pine.NEB.4.33.0308162043150.27252-100000@norge.freeshell.org... When I put my computer... -
Opinion which to get?
I'm considering getting a Mac for my I.T company. I currently have a PC notebook but the display starting going after 2 months of use. It was... -
your opinion
Hey I just wanted to get some opinion's on this site I building right now. I through it up on a free brinkster.com server for testing. just... -
Roy in #2
Re: Please share your opinion with me.
Consider what happens in the future when you get another developer. You
will have to train him or her to talk the person responsible for adding
session variables.
"Jerry" <JGAO2183@rogers.com> wrote in message
news:K00Xa.34777$4UE.13757@news01.bloor.is.net.cab le.rogers.com...going> I am sorry for posting this message again. But I really want to hear more
> responses.
>
> ---
> My company is designing a new ASP.Net web application. Becasuse of the
> concern of abusing Session variable(will consume memory), our team isin> to use following apporach to avoid it. Some of team members think it is
> unnecessary and don't agree with this approach. I would like to hear your
> oppinion about this. Or if you use any of process to limit the developers
> using session variables in the ASP web application. Thank you in advance.
> Following is our proposal process.
> 1. Add the session variable names to the webconfig file. Only one personthe> the team( 7 developers) is allowed to add it. So if other developers inthe> team need to add new session variable, they need to ask that person to add
> it in the Webconfig file first.
> 2. Create a wrapper class for getting and setting the session variable
> values. This wrapper class will check if the session variable exists in> webconfig file. If not, error returns. Developers ,instead of calling
> Session object directly, will call the wrapper class method.
>
> Regard
>
> Jerry
>
>
>
>
>
Roy in Guest
-
Jerry #3
Re: Please share your opinion with me.
Thanks Marina, Natty, Roy for your responses.
In order for me to persuade my application architects to give up this
process, I would appreciate more application architects and developers'
thought about this process.
Thanks
Jerry
"Natty Gur" <natty@dao2com.com> wrote in message
news:uolZYyXWDHA.1480@tk2msftngp13.phx.gbl...> Hi,
>
> 1) Although Session class is sealed you can override the Page Session
> property to gain what you after. I did it once in one of my articles:
> [url]http://www.codeproject.com/useritems/sessionstate.asp[/url]
>
> 2) What about web farm and application maintenance? To add new session
> variable one need to add it to all machines in the farm.
>
> 3) It looks clumsy that developer should "Run" after other developer to
> add session variable. By the way if you want to control all the session
> variables it should be done by one person, isn't it?
>
> 4) If you concern about the server memory what about using the Server
> state machine? Yes its hart's performance but the suggested method
> doesn't donate to application performance either. (Look at Table 1.0 in
> the article)
>
>
>
> Natty Gur, CTO
> Dao2Com Ltd.
> 34th Elkalay st. Raanana
> Israel , 43000
> Phone Numbers:
> Office: +972-(0)9-7740261
> Fax: +972-(0)9-7740261
> Mobile: +972-(0)58-888377
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Jerry Guest
-
Natty Gur #4
Re: Please share your opinion with me.
One more point : Every change in the web.config will end up with
restarting your application. So if you want to add new session variable
while the application running it will end up with restarting the
application and loosing all the current session state. If you choose to
take this root maybe its better to save the session variable
"declaration" in DB (this way there is one control over the variable
declaration) and to load it in the application cache to be use by the
program.
I understand the concern about memory usage but actually the problem
isn’t the number of session variables but the size of the variable. I
already see programmers that hold mega bytes of data (DataSet) in one
session variable. I don’t think that the suggested approach will help
your application architect to control the size of memory that the
session variables will take. all the projects that I involved in until
now just send small chunk of text in the Session and although they serve
600-800 RPS on machine with 2GB of RAM they never use more then 30% of
the RAM. If I have to look after solution to memory usage I would
Override the page session property and check the size of the data that
the programmer is going to save on the disk (Serialization for objects
:-( ) and decide if I save it on the disk or on Remote machine or DB.
Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Rajeev Soni #5
Re: Please share your opinion with me.
Hi,
well using the session object whenever required / storing the appropriate values is ok, but restricting the developers by just defining the rule of readding the session variable name from the Web.Config file will just add another over head of reading an external file first then reading/placing the values in session.
best thing to do is to access session directly without storing the names in web.config file and as add a coding standard to project development as adding any new session variables should be... approved.
you can also have peer reviews on the code
and u can anytime easily check the values in session by simple writing the peice of code
for (int 1=0; i<Session.Count; i++)
{
Response.Write("<BR>Key : " + Session.Keys[i] + " Value : " + Session[i].ToString());
}
Rajeev
Rajeev Soni Guest



Reply With Quote

