Re: Common Setup package (do pear packages create their own seperate DB connections?)

From: Date: Tue, 22 Apr 2003 18:43:50 +0000
Subject: Re: Common Setup package (do pear packages create their own seperate DB connections?)
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15344@lists.php.net to get a copy of this message
> the last discussion started by Jeroen makes me come up with this topic > again. > > I would suggest to provide some kind of Common-package in PEAR, which > contains some classes like: > - ([M]DB-)connection setup (i.e. PEAR_Common_Connection_DB) > - set/getOption (i.e. PEAR_Common_Option) > > Those would be mini-classes which currently a lot of packages > implement over and over again. For some packages it would mean > overhead but i think the majority would profit from it. > Those Common-classes could be combined with the actual package using > the Decorator pattern (i think its not the best way, just a first > thought, better suggestions are welcome). > > PEAR_Common_Connection_DB would provide i.e. > - connect() > - getInstance() > - disconnect() > > PEAR_Common_Option would provide i.e. > - setOption() > - getOption() > - getOptions() > > I experienced that in Xipe, Tree and Auth (not PEAR::Auth but [1]) i > am using the code always again to implement this functionality and > this topic is already bothering me for quite a while. > > Opinions? > Sounds interesting. What is the Decorator pattern, any URLs? Thanks Jeroen

« previous php.pear.dev (#15344) next »