NET Architecture & Design: design and good practice question

  • tutus / 102 / Sat, 07 Nov 2009 04:24:00 GMT / Comments (10)
  • When the user is going through the web site pages, if weneed to persist our objects so that we can access them from the different pages(Customer Object, Address Object or Invoice object for ex.) Is it better tostore those objects in public variables declared in module files or is itbetter to put our objects in session variables

    or is there any other better practice
    Thanks for your help
  • Keywords:

    design, good, practice, net, architecture

  • http://dotnet.itags.org/dotnet-architecture-design/153010/«« Last Thread -
    1. It's better to store in the Session I would think.

      A better way might be to store them in a Cache. And then retrieve it based on Session ID. Anytime you want to "edit" an object, you can check if it is already in the cache.

      I dont know how this would scale though.

      vze1r2ht | Sat, 05 Jan 2008 19:52:00 GMT |

    2. thanks, how about if we wanna retrieve info according to the browser ID. let s say the user opens 2 instances of Internet Explorer, displaying the same page (Address.aspx for ex.). but he enters some information on the first instance and diferent information in the second instance of the browser.

      Will we be able to put back the same info that beongs to the right IE instance when the user goes back and diplays the page next time.

      not sure if my question makes sens.

      Than ks a lot.

      tutus | Sat, 05 Jan 2008 19:54:00 GMT |

    3. thanks, how about if we wanna retrieve info according to the browser ID. let s say the user opens 2 instances of Internet Explorer, displaying the same page (Address.aspx for ex.). but he enters some information on the first instance and diferent information in the second instance of the browser.

      Will we be able to put back the same info that beongs to the right IE instance when the user goes back and diplays the page next time.

      not sure if my question makes sens.

      Than ks a lot.

      tutus | Sat, 05 Jan 2008 19:55:00 GMT |

    4. If the user opens two instances of IE then it will have different sessions. But if they click New Window it will use the same one, and they will share a single session.

      tasunder | Sat, 05 Jan 2008 19:56:00 GMT |

    5. TAsunder:
      If the user opens two instances of IE then it will have different sessions.

      How can we open two instances of IE not sharing session (the context)?

      -LV

      ludovicovan | Sat, 05 Jan 2008 19:57:00 GMT |

    6. LudovicoVan:

      TAsunder:
      If the user opens two instances of IE then it will have different sessions.

      How can we open two instances of IE not sharing session (the context)?

      -LV

      If you click "New Window" you get a new IE window but if you check the Task Manager you will see that only one IExplore.exe instance exists. In this case all the windows opened with the "New Window" or using Ctrl+N will share the same Session Objects. If on the other hand you select the IE shortcut then you get a new instance of IExplore.exe in the task manager. This new instance does not share any information with the other ones.
      One other thing. In IE7 all the tabs share Session Information.
      Hope this helps.

      ricardofrancisco | Sat, 05 Jan 2008 19:58:00 GMT |

    7. Wow, this is new to me. Is this a new feature with IE 6 and up, or just had i a wrong idea about how the browser worked?

      Thanks. -LV

      ludovicovan | Sat, 05 Jan 2008 19:59:00 GMT |

    8. LudovicoVan:

      Wow, this is new to me. Is this a new feature with IE 6 and up, or just had i a wrong idea about how the browser worked?

      Thanks. -LV

      Wrong idea I guess. It's been working that way since at least IE4.

      tasunder | Sat, 05 Jan 2008 20:00:00 GMT |

    9. You can also use cookies (either client-side or server-side).. It would be possible for you to detect if information has already been inputed and provide errorhandling logic (if necessary).

      christiantoivola | Sat, 05 Jan 2008 20:01:00 GMT |

    10. All I got after the pre-viwing mistake of trees was images of a building and that was very strong! ,

      guest | Thurs, 22 Oct 2009 15:40:00 GMT |