RE: [PHP-DEV] serializing references, almost without modifications

From: Date: Thu, 20 Jul 2000 09:22:54 +0000
Subject: RE: [PHP-DEV] serializing references, almost without modifications
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-25192@lists.php.net to get a copy of this message
Hi, > Its an interesting question: what does it mean to "restore an > applications state"? It means that you restore the objects and vars to its former glory, in the state it was left when it was last registered. > Given that there is a Web server, loading a PHP module, that then sucks > up a PHP script and then spits out a stream of HTTP to the Web > browser.... in a sense, that HTTP stream is your serialization. I have no clue where you have that idea from, but it doesn't make sense to treat what you spit out to the client as anything meaningful except for the fact that it allows modification of current objects/vars. The client can never be trusted to contain information, and giving out information to the client is deadly considering how easy it would be to change some of that information. What you (I) want is to be able to continue where you left you objects last time you were hit -- so if you have an object containing information about a basket you want to update the state by changing the number etc. etc. > Saving and restoring state makes sense with stateful applications, but > on the Web, which is basically stateless (ignoring the backend stuff), > there is little need for it. Maybe it is even dangerous.... Actually, it doesnt make sense in a stateful application since you, at any given time, should know the state of the application, hence not HAVING the need for saving and/or restoring a state except for that one time where you start/close the application. Does that resemble PHP -- yes it does, it has to save/restore whenever it gets started/stopped, it just (generally) has much less properties than a non-web application. I don't -- at all -- se why it could possibly be dangerous, but if you'd care to elaborate, and maybe give some concrete examples rather than all this vagueness, that be highly appreciated. Kind regards, David Hjortsoe.

« previous php.dev (#25192) next »