someone please explain object persistance 
Author Message
 someone please explain object persistance

--Why would you want an object to retain its property values once it's been
destroyed...

Mitch Abaza

remove NOSPAM to reply via email



Thu, 27 Jun 2002 03:00:00 GMT  
 someone please explain object persistance
Probably because you want to use the same settings again the next time you
open the program.  If you are storing data in an object, losing the data
tends to suck...

Object persistance is just one way to keep the info around.

--Russell


Quote:

> --Why would you want an object to retain its property values once it's
been
> destroyed...

> Mitch Abaza

> remove NOSPAM to reply via email



Thu, 27 Jun 2002 03:00:00 GMT  
 someone please explain object persistance

--Not to belabor the obvious, but if the data stored in an object is still
needed by an app, why destroy the object to begin with?  I'm just looking
for a real world business scenario that would necessitate object
persistence.

Thanks

Mitch Abaza

remove NOSPAM to reply via email

Quote:
> Probably because you want to use the same settings again the next time you
> open the program.  If you are storing data in an object, losing the data
> tends to suck...

> Object persistance is just one way to keep the info around.

> --Russell



> > --Why would you want an object to retain its property values once it's
> been
> > destroyed...

> > Mitch Abaza

> > remove NOSPAM to reply via email



Fri, 28 Jun 2002 03:00:00 GMT  
 someone please explain object persistance

Quote:

>--Not to belabor the obvious, but if the data stored in an object is still
>needed by an app, why destroy the object to begin with?  I'm just looking
>for a real world business scenario that would necessitate object
>persistence.

1.  You need to be able to restore an object state after the program
ends, windows shuts down, etc.  For example, imagine that an object
stores the choices a user makes for configuring a database interface.
You then want to be able to restore that configuration after a reboot,
for example

2.  You need so many objects that you can't afford to have COM keep them
all active at once.  So you can persist their properties under MTS, which
then destroys the objects.  MTS will use the persistent state to
reconsitute the objects when they are called on again.

Matthew Cromer
President, SDA Consulting, Inc.

http://www.sdaconsulting.com



Fri, 28 Jun 2002 03:00:00 GMT  
 someone please explain object persistance
Hi Mitch,


Quote:
> --Not to belabor the obvious, but if the data stored in an object is still
> needed by an app, why destroy the object to begin with?  I'm just looking
> for a real world business scenario that would necessitate object
> persistence.

Object persistence has its uses. One of them, like Matthew says, is on MTS.
There are others -- imagine a class that wraps a document object (as in MFC, for
example). I'd definitely want to have the thing write its state into disk and be
able to load it back again whenever I want.

Such a situation straddles the line of the process lifetime: You need the data,
but you can't store it in memory once your app unloads.

Of course, you don't need to use an object to do all this, but then again you
can write a fully functional VB app using only a Sub Main ;-)

. . . . . . . . . . . . . . . . . . . . . .
Please post/reply to the
newsgroup(s)

Klaus H. Probst, MVP
   http://www.vbbox.com/
   http://www.mvps.org/ccrp/



Fri, 28 Jun 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Can someone PLEASE explain this simple thing?

2. Help: Can someone Please Explain why the following happens

3. Can someone explain this code for me please?

4. Please can someone explain what this error is

5. Hello, could someone please explain to me..

6. Could someone please explain In Process Servers?

7. Someone explain VB class reasoning to me, please...

8. Could someone please explain this line of code?

9. Please can someone explain what this error is

10. Please can someone explain what this error is

11. Can someone please explain connect strings....?

12. Please can someone explain what this error is

 

 
Powered by phpBB® Forum Software