Please share your opinion with me.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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:...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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...
    > 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
    >
    >
    >
    >
    >

    Roy in Guest

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139