Re: Business Objects and Session Variables

From: Patrice Scribe (nobody_at_nowhere.com)
Date: 02/02/04


Date: Mon, 2 Feb 2004 20:31:49 +0100

Addtionaly make sure it doesn't matter to your app. If you are uses a
classes that protects your app from implementation details you'll be able to
balance this behavior as needed....

Patrice

-- 
"Dave Wurtz" <dave_!!no_spam!!wurtz@asdsoftware.com> a écrit dans le message
de news:401e775d$1@news.splitrock.net...
> All,
>
> I'm new to ASP development and I have a basic design question:
>
> Is it ok to store business objects to session variables or is there a
better
> way to keep object information?
>
> For example, if a user logs onto the website, a user object is created
that
> stores their full name, email address, street address, phone, etc.  This
> object also has methods to do 'other' things such as validations,
counters,
> etc.  When the user logs in, the object is instantiated.  Is it ok to keep
> this object for the life of the session?  If some items are always needed
> (for example maybe the full name is on the header of every page), it is
very
> convenient just to call a property off of the user object.
>
> I've also seen some examples where the primary key of the object is stored
> in the session variable, and the object is rebuilt all of the time.  Which
> way is better?
>
> Storing the user object for the life of the session is definitely more
> convenient for the programmer, but is it going to kill my performance?  On
> the other hand, recreating the user object each time would potentially
have
> to requery the database to retrieve information - is this going to kill my
> performance?
>
> Any help on this would be very much appreciated!
>
> Thanks.
>
> Dave Wurtz
> Advanced Software Designs
>
>


Relevant Pages

  • Business Objects and Session Variables
    ... I'm new to ASP development and I have a basic design question: ... Is it ok to store business objects to session variables or is there a better ... convenient just to call a property off of the user object. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Collection Classs
    ... If your app only uses a max of 1 user object at a time, ... > example a user class and then had the user objects that got created ... > into a user collection. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: User Class
    ... The User object is kept in your ASP.NET application. ... > this reference in other classes that I create. ... They also have a namespace that is different than the ... > rest of my app. ...
    (microsoft.public.dotnet.framework.aspnet.security)