commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kennedy <apu...@dsl.pipex.com>
Subject Re: Your commits to commons-configuration
Date Tue, 14 Jan 2003 22:31:14 GMT
Morgan,
For what it is worth, all of the Java projects I've worked on have
adopted XmlStyle for the simple reason that while we all know
about URLs and XML, the proliferation of acronyms in fields
like telecommunications and finance (yes, I've worked in both)
can lead to confusion - running two or more acronyms together
in a classname is sadly common. At least with XMLURLFactory
you can guess what is meant - try that with UGLIAIDConverter
during your first week at a new job!

As for what the JDK does - I'm disappointed that XMLStyle
is still popular, but of course Sun has hired Ordinary People
as programmers, and as we all know, organisations don't
always do what we might wish. Certainly part of the reason
I enjoyed Bloch's excellent book is the insight into what
Sun's employees think of parts of their own product.

However, XMLStyle vs XmlStyle isn't the worst thing to encounter
in code and I'll be happy to work with either so long as things
are consistent.

Moving on - I'm delurking with an eye to contributing something,
work permitting, and have singled out commons Lang and Collections
as 'easy' places to start where I can concentrate on CVS and 'how
we do things' more than the actual code. There are quite a few docs
on the Jakarta site - if anyone has specific recommendations for
where to start or for good guides I'd welcome them.

David Kennedy

On Tuesday, January 14, 2003, at 09:26  pm, Morgan Delagrange wrote:

> Boy, is my face red.  :)  Well, then, I would agree
> that uppercase is better, even though mixed case is
> used throughout Catalina, certain Commons components,
> etc.
>
> - Morgan
>
> --- "Craig R. McClanahan" <craigmcc@apache.org> wrote:
>>
>>
>> On Tue, 14 Jan 2003, Morgan Delagrange wrote:
>>
>>> Date: Tue, 14 Jan 2003 10:33:29 -0800 (PST)
>>> From: Morgan Delagrange <mdelagra@yahoo.com>
>>> Reply-To: Jakarta Commons Developers List
>> <commons-dev@jakarta.apache.org>,
>>>      morgand@apache.org
>>> To: Jakarta Commons Developers List
>> <commons-dev@jakarta.apache.org>
>>> Subject: RE: Your commits to commons-configuration
>>>
>>> Not the J2EE JDK.
>>>
>>>
>>
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/package-summary.
> html
>>>
>>>
>>
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/package-summary.
> html
>>>
>>
>> Can't speak for all of J2EE, but at least in the
>> servlet spec, the
>> upper-lower case versions of the names were
>> deprecated and replaced by
>> uppercase-only versions in Servlet 2.1 (a *long*
>> time ago :-).  Examples:
>>
>>   javax.servlet.http.HttpRequest:
>>   ------------------------------
>>   isRequestedSessionFromUrl() -->
>> isRequestedSessionFromURL()
>>
>>   javax.servlet.http.HttpResponse:
>>   -------------------------------
>>   encodeUrl() --> encodeURL()
>>   encodeRedirectUrl() --> encodeRedirectURL()
>>
>> The upper case version is certainly the trend in
>> standard Java APIs, but
>> backwards compatibility requirements hamper how
>> quickly you can get rid of
>> past inconsistencies.
>>
>>> But I agree that it's inconclusive.  Naughty,
>>> inconsistent Sun specs...
>>>
>>> - Morgan
>>
>> Craig
>>
>>
>>>
>>> --- "Krohn, Dave" <DKrohn@eb.com> wrote:
>>>> Looking at the JDK itself:
>>>>
>>>> URL
>>>> URLClassLoader
>>>> SQLException
>>>> UIDefaults
>>>>
>>>> It seems that within the JDK Sun is pretty
>>>> consistent with all caps for
>>>> acronyms.
>>>>
>>>>> -----Original Message-----
>>>>> From: Morgan Delagrange
>>>> [mailto:mdelagra@yahoo.com]
>>>>> Sent: Tuesday, January 14, 2003 12:13 PM
>>>>> To: Jakarta Commons Developers List
>>>>> Subject: Re: Your commits to
>> commons-configuration
>>>>>
>>>>>
>>>>>
>>>>> --- Kurt Schrader <kschrader@karmalab.org>
>> wrote:
>>>>>> On 14 Jan 2003, Henning Schmiedehausen
>> wrote:
>>>>>>
>>>>>>> According to Sun naming rules (and Apache
>>>>>> convention), even acronyms are
>>>>>>> written in the "first letter caps" rule in
>>>> method
>>>>>> and class names. So
>>>>>>> IMHO "XmlConfiguration" is better than
>>>>>> "XMLConfiguration".
>>>>>>>
>>>>>>> Same goes for "DOM4JConfiguration" vs.
>>>>>> "Dom4JConfiguration".
>>>>>>>
>>>>>>> I'd like to get these class names changed
>>>> back.
>>>>>>
>>>>>> The Sun naming rules don't say anything
>> about
>>>>>> acronyms.
>>>>>
>>>>> Actually they do talk about acroymns in class
>>>> names,
>>>>> they just don't seem to pin down the
>>>> capitalization:
>>>>>
>>>>>
>>>>
>>>
>>
> http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
>>>>>
>>>>>> Effective Java (pg. 165) says:
>>>>>>
>>>>>> There is little consensus as to whether
>> acronyms
>>>>>> should be uppercase or
>>>>>> have only their first letter capitalized.
>>>>>>
>>>>>> Either way should be ok.
>>>>>>
>>>>>> -Kurt
>>>>>>
>>>>>
>>>>> I agree with Henning that the preponderance of
>>>> Apache
>>>>> classes seem to use mixed case for acroymns.
>>>> Also,
>>>>> recent Java packages ("javax.servlet",
>>>>> "javax.servlet.jsp" e.g.) seem to use mixed
>> case,
>>>> but
>>>>> older packages (e.g. "java.net") do not.  I
>> think
>>>>> precedent supports Henning.
>>>>>
>>>>> - Morgan
>>>>>
>>>>> =====
>>>>> Morgan Delagrange
>>>>> http://jakarta.apache.org/taglibs
>>>>> http://jakarta.apache.org/commons
>>>>> http://axion.tigris.org
>>>>> http://jakarta.apache.org/watchdog
>>>>>
>>>>>
>> __________________________________________________
>>>>> Do you Yahoo!?
>>>>> Yahoo! Mail Plus - Powerful. Affordable. Sign
>> up
>>>> now.
>>>>> http://mailplus.yahoo.com
>>>>>
>>>>> --
>>>>> To unsubscribe, e-mail:
>>>>
>> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <mailto:commons-dev-help@jakarta.apache.org>
>>>>
>>>
>>>
>>> =====
>>> Morgan Delagrange
>>> http://jakarta.apache.org/taglibs
>>> http://jakarta.apache.org/commons
>>> http://axion.tigris.org
>>> http://jakarta.apache.org/watchdog
>>>
>>> __________________________________________________
>>> Do you Yahoo!?
>>> Yahoo! Mail Plus - Powerful. Affordable. Sign up
>> now.
>>> http://mailplus.yahoo.com
>>>
>>> --
>>> To unsubscribe, e-mail:
>> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail:
>> <mailto:commons-dev-help@jakarta.apache.org>
>>>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:commons-dev-help@jakarta.apache.org>
>>
>
>
> =====
> Morgan Delagrange
> http://jakarta.apache.org/taglibs
> http://jakarta.apache.org/commons
> http://axion.tigris.org
> http://jakarta.apache.org/watchdog
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>
>
David Kennedy
david.kennedy@dsl.pipex.com


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message