Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 384 invoked from network); 25 Apr 2005 08:33:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Apr 2005 08:33:46 -0000 Received: (qmail 40703 invoked by uid 500); 25 Apr 2005 08:34:13 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 40521 invoked by uid 500); 25 Apr 2005 08:34:12 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 40501 invoked by uid 99); 25 Apr 2005 08:34:12 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 25 Apr 2005 01:34:12 -0700 Received: (qmail 367 invoked from network); 25 Apr 2005 08:33:42 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by 127.0.0.1 with SMTP; 25 Apr 2005 08:33:42 -0000 Message-ID: <426CAB60.4030002@apache.org> Date: Mon, 25 Apr 2005 10:33:36 +0200 From: Armin Waibel User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: Re: [vote] Naming standard References: <224f3234050424060970a65b9e@mail.gmail.com> <5106fe01a66d1391f84c72e0066f9270@apache.org> In-Reply-To: <5106fe01a66d1391f84c72e0066f9270@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: 127.0.0.1 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Brian McCallister wrote: >> * The class names of Implementations of such interfaces end in "Impl". >> >> [ ] +1 >> [ ] +/- 0 >> [X ] -1 > > > Use a descriptive name instead. > Think we should difference in this case. If the interface named StatementManager and OJB shipped with one pluggable class, then StatementManagerImpl/StatementManagerDefaultImpl is descriptive enough (what will be more descriptive?). The OJB user can extend/implement his own class and can name it StatementManagerMyCompanyImpl. On the other hand we have interfaces like ObjectCache. In this case a descriptive name is mandatory, because OJB itself shipped with several versions and the function of ObjectCache is not clear. So names like ObjectCacheReadOnlyImpl, ObjectCacheTwoLevelImpl, ... are useful. >> >> * Abstract base classes of such implementations have their name ending >> in "AbstractImpl" >> >> [ ] +1 >> [ ] +/- 0 >> [X ] -1 > > > Would prefer BaseFoo or, even better a descriptive name, to > FooAbstractImpl. > Could you give an example. What will be the descriptive name of ConnectionFactoryAbstractImpl? AbstractConnectionFactory/BaseConnectionFactory isn't more descriptive. >> >> * If OJB ships with one concrete implementation, and the interface is >> meant to be an extension point for users for their own implementations >> (e.g. ProxyFactory), then the implementation class name ends in >> "DefaultImpl". >> >> [ ] +1 >> [ ] +/- 0 >> [X ] -1 > > > DefaultProxyFactory is way better than ProxyFactoryDefaultImpl > but then you have to look for DefaultProxyFactory JDKProxyFactory CGLibProxyFactory if you don't know the name in advance you have to search all class names (or look for all implementations of ProxyFactory interface) to find the shipped implementation classes. If we use ProxyFactoryDefaultImpl ProxyFactoryJDKImpl ProxyFactoryCGLibImpl it's easier to "bunch" the different implementation classes. Seems you don't like the AInterfaceNameImpl/AInterfaceNameDefaultImpl naming convention in general. Is it a linguistic problem? E.g. no one would say "BallGreen" if a "green ball" was meant. regards, Armin --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org