Is this a good way? Please advise.

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

  1. #1

    Default Re: Is this a good way? Please advise.

    What exactly do you want to store in session? Are we talking datasets with
    10000 rows each, or just some strings or integers?

    Your process implies distrust of the developers. Why not just decide which
    session variables you need, and then that's what the developers would
    create? Just make it clear that there has to be an approval process first -
    but isn't this complicated scheme a bit overboard? I mean, if someone
    doesn't want to follow the rules, he will just access the Session object
    directly. And if everyone is willing to follow them, then they will just do
    so, and be responsible with the Session object.

    "Jerry" <JGAO2183@rogers.com> wrote in message
    news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...
    > Dear All,
    > 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.
    >
    >
    >
    > Regards
    >
    > Jerry
    >
    >
    >

    Marina Guest

  2. Similar Questions and Discussions

    1. Xcart no good, support no good, need good shopping cart!!!
      I need a good quality php shopping cart to port to my site, allowing software downloads and book sales. Integrating ease is really important and...
  3. #2

    Default Re: Is this a good way? Please advise.

    Hi Jerry,

    Your question is a bit confusing to me. Session State is global only to a
    single user Session. Data stored in the Web.Config file is global to the
    entire application and all user Sessions. Session State is a place to store
    user-specific, Session-Specific information. Therefore, if the data you're
    talking about is global, you should certainly NOT be using Session State, as
    the data would be reproduced unnecessarily in each user's Session, which
    would be a memory drain.

    I think you need to give some thought to identifying what data is
    User/Session-specific, and what data is global, and use the appropriate
    mechanism for each type of data.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Complex things are made up of
    lots of simple things.

    "Jerry" <JGAO2183@rogers.com> wrote in message
    news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...
    > Dear All,
    > 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.
    >
    >
    >
    > Regards
    >
    > Jerry
    >
    >
    >

    Kevin Spencer Guest

  4. #3

    Default Re: Is this a good way? Please advise.

    Hi, Marina,
    Thank you for your response. The data stored in the session could be 10000
    rows data set as you said, it could also be string or intergers. The only
    purpose of this process is to limit developers from using session
    variables.

    So your vote: NO
    Thank you again.


    Jerry

    "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
    news:edT$qOFWDHA.2276@TK2MSFTNGP10.phx.gbl...
    > What exactly do you want to store in session? Are we talking datasets
    with
    > 10000 rows each, or just some strings or integers?
    >
    > Your process implies distrust of the developers. Why not just decide
    which
    > session variables you need, and then that's what the developers would
    > create? Just make it clear that there has to be an approval process
    first -
    > but isn't this complicated scheme a bit overboard? I mean, if someone
    > doesn't want to follow the rules, he will just access the Session object
    > directly. And if everyone is willing to follow them, then they will just
    do
    > so, and be responsible with the Session object.
    >
    > "Jerry" <JGAO2183@rogers.com> wrote in message
    > news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...
    > > Dear All,
    > > 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.
    > >
    > >
    > >
    > > Regards
    > >
    > > Jerry
    > >
    > >
    > >
    >
    >

    Jerry Guest

  5. #4

    Default Re: Is this a good way? Please advise.

    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
    "Jerry" <JGAO2183@rogers.com> wrote in message news:5rHWa.72322$rsJ.33292@news04.bloor.is.net.cab le.rogers.com...
    > Hi, Marina,
    > Thank you for your response. The data stored in the session could be 10000
    > rows data set as you said, it could also be string or intergers. The only
    > purpose of this process is to limit developers from using session
    > variables.
    >
    > So your vote: NO
    > Thank you again.
    >
    >
    > Jerry
    >
    > "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
    > news:edT$qOFWDHA.2276@TK2MSFTNGP10.phx.gbl...
    > > What exactly do you want to store in session? Are we talking datasets
    > with
    > > 10000 rows each, or just some strings or integers?
    > >
    > > Your process implies distrust of the developers. Why not just decide
    > which
    > > session variables you need, and then that's what the developers would
    > > create? Just make it clear that there has to be an approval process
    > first -
    > > but isn't this complicated scheme a bit overboard? I mean, if someone
    > > doesn't want to follow the rules, he will just access the Session object
    > > directly. And if everyone is willing to follow them, then they will just
    > do
    > > so, and be responsible with the Session object.
    > >
    > > "Jerry" <JGAO2183@rogers.com> wrote in message
    > > news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...
    > > > Dear All,
    > > > 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.
    > > >
    > > >
    > > >
    > > > Regards
    > > >
    > > > Jerry
    > > >
    > > >
    > > >
    > >
    > >
    >
    >
    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