RE: [PEAR-QA] CS discussion

From: Date: Tue, 15 Jul 2003 20:18:47 +0000
Subject: RE: [PEAR-QA] CS discussion
References: 1  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-63@lists.php.net to get a copy of this message
> From: Jon Parise [mailto:jon@php.net] > Sent: Tuesday, July 15, 2003 10:16 PM > On Tue, Jul 15, 2003 at 08:58:26PM +0200, Lukas Smith wrote: > > > Hmm not sure what the best solution is there. I tend to think that even > > there it would be beneficial to use (dis)connect(). The first thing you > > might be looking for would be open()/close() however if they are absent > > I think it would be quite obvious that (dis)connect() is the method you > > want. And making this the same across all classes is cleaner, especially > > with so many PEAR classes allowing file and database access through > > containers. > > If the first thing you're looking for is open() / close(), then that's > what they should be named (especially if they're accurate names). > > I understand that you want to use a generic name for containers, but > think of a Cache container. It's more natural to open or close a > cache, not connect and disconnect to it. But when we're talking about > a database connection, the connect() / disconnect() pair is more > obvious. The question is just if we can educate our users to think different (tm) :-) Once they do I think there is a benefit. However lets not shot the entire idea down based on that single proposal. For example currently in LiveUser the factory method is called create() and I hear some packages use getInstanceOf() for the singleton. Regards, Lukas

« previous php.pear.qa (#63) next »