RE: [PHP] sessions and objects

From: Date: Thu, 22 Feb 2001 17:56:32 +0000
Subject: RE: [PHP] sessions and objects
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41184@lists.php.net to get a copy of this message
Why is this good design? If I create a user object, populate it, kill the connection to the database (or return it to the pool) and cache the object then I can retrieve it any time I want without having to hit the database. Not arguing, just curious as to your perspective. Cal http://www.calevans.com -----Original Message----- From: jeremy brand [mailto:jeremy@nirvani.net] Sent: Thursday, February 22, 2001 11:46 AM To: Kevin Beckford Cc: php-general@lists.php.net Subject: Re: [PHP] sessions and objects Don't store your object in the session, that is just bad design. Store a lookup value, then grab your object from your DB only when you need it. Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer Get your own Free, Private email at http://www.smackdown.com/ On Thu, 22 Feb 2001, Kevin Beckford wrote: > Date: Thu, 22 Feb 2001 12:36:29 -0500 > From: Kevin Beckford <kevin1@outcomemail.com> > To: php-general@lists.php.net > Subject: [PHP] sessions and objects > > Hello all, > I've been away from php for a while, ( and I'm glad to be back) Last > time I checked in, sessioning was kinda working - especially the sessioning > of objecs. Is this feature robust enough for production now? I want to do > basic sessioning, and I don't have a lot of development time. What I want to > do is simply : > - Log in > -instantsiate an object that will contain the user information > -save the data in session > -allow me to recreate that object from page to page > How would I do/find out how to do this? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#41184) next »