Re: [Package Proposal] PHP_Application_Vars
| From: | Stefan Walk | Date: | Sat, 23 Aug 2003 21:18:29 +0000 |
| Subject: | Re: [Package Proposal] PHP_Application_Vars | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20445@lists.php.net to get a copy of this message | ||
I'm against using $_SESSION for this. It has some serious drawbacks,
some of them already mentioned, others are: Only one script can use the
same session at a time. If you use the same session throughout your
application, that means you have only script running at a time - no
concurrent requests anymore, which makes your application slow.
Also, the syntactic sugar using $_SESSION is not really neccessary,
because functions and class functions are also available everywhere.
IMO, if Application vars are implemented, they should be accessed
through (class) functions. You could have seperate classes for
application variables using files, shared memory, databases, ... using
the same API providing (at least) methods to get and set variables and
beginning, commiting or reverting transactions.
--
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de>