RE: [PEAR-DEV] do pear packages create their own seperate DB connections?
| From: | Lukas Smith | Date: | Tue, 22 Apr 2003 15:20:54 +0000 |
| Subject: | RE: [PEAR-DEV] do pear packages create their own seperate DB connections? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15335@lists.php.net to get a copy of this message | ||
> From: Wolfram Kriesing [mailto:wolfram@visionp.de]
> Sent: Tuesday, April 22, 2003 5:12 PM
> now i dont have to instanciate the DB myself, since i dont really need
> it. Only the packages i use need the DB-connection. I actually use
> only 3 packages that need a DB-connection (iirc) Auth, Tree,
> DB_QueryTool. To those packages i simply pass the DB_DSN and they
> (should) handle themselves if/when they need a DB-connection.
Hmm well to me there are two things that might create overhead here:
1) object creation
2) connection establishing
2) does not exist in MDB as the connection is created on demand with the
first query. So if you simply always create an MDB object which you then
pass to any package you use, the only overhead you have in the case you
don't need a Db connection is the MDB object creation.
I don't really understand how standard PEAR packages should be able to
figure out if you have an instance of a certain package from global
space without a total mess? I am probably misunderstanding what you are
proposing here.
Regards,
Lukas