Re: [PEPr] +1 for Database::DB_eXist
| From: | Martin Jansen | Date: | Wed, 24 May 2006 16:42:00 +0000 |
| Subject: | Re: [PEPr] +1 for Database::DB_eXist | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42601@lists.php.net to get a copy of this message | ||
On Tue May 23, 2006 at 03:1001PM -0000, Lukas Smith wrote:
> I also agree with the pervious condition. Also most packages in use
> factory() and singleton() methods names instead of getInstance().
I have been wondering for quite some time if factory()/singleton() are
actually the best names for those methods. It looks like we adopted
them from Horde, while the Java-world uses getInstance() for methods
that implement the singleton pattern. Concerning the factory pattern,
I'm not sure if they are using a common name.
While factory() and singleton() make clear which patterns are
implemented by the methods, the advantage of getInstance() is that even
people who have no clue what a singleton is will figure out what the
method basically does.
- Martin