incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: Coding conventions
Date Fri, 07 Jul 2006 18:40:45 GMT
no, not yet.

but I do later

On 7/7/06, Pavitra Subramaniam <pavitra.subramaniam@oracle.com> wrote:
> Matthias,
> Have you already added the items here to our WIKI?
>
> Thanks
> - Pavitra
>
> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of Matthias Wessendorf
> Sent: Thursday, July 06, 2006 9:16 AM
> To: adffaces-user@incubator.apache.org
> Subject: Re: Coding conventions
>
> yes
>
> On 7/6/06, Adam Winer <awiner@gmail.com> wrote:
> > On 7/6/06, Simon_Lessard@dmr.ca <Simon_Lessard@dmr.ca> wrote:
> > >
> > > Hello,
> > >
> > > Do we have a section on the site about the coding conventions we're
> > > supposed to follow? Currently ADF Faces seems to use the following:
> > >
> > > Private members and methods use underscore (_) prefix ;
> >
> >
> > Yes.  In addition, package-private use double underscore prefixes.
> > This is intentionally ugly;  we strongly discourage the use of
> > package-private access, and in general recommend everything receive
> > the most limited access possible.
> >
> > Constants are imported using implements on a contant interface
> > (Shouldn't
> > > we use fully qualified name or static imports instead?) ;
> >
> >
> > This isn't a standard as such;  it was a common coding practice (esp.
> > UIConstants), but we're moving away from it.
> >
> > Constants and attributes are defined at the end of the class files,
> > after
> > > methods ;
> >
> >
> > Yep.
> >
> > Constant names are in uppercase, with each words separated with an
> > > underscore (standard rule) ;
> >
> >
> >
> > Yep.
> >
> > Method and variable names are in lowercase except for the first letter
> > of
> > > every word after the first forming them that should be in uppercase
> > > ;
> >
> >
> > Yep.
> >
> >
> > Methods don't seem to appear in any specific order (any rule on this?)
> > ;
> >
> >
> >
> > They're *supposed* to go:  constructor, public, protected, package, private.
> > We've been lax in enforcing that.
> >
> > Asbtract classes does not seems to be used much, instead they provide
> > a
> > > protected method with a dummy behavior to be overridden ;
> >
> >
> > It varies;  it's used here and there.
> >
> > Generics are used, but not always (should we convert every classes we
> > see
> > > to use them?) ;
> >
> >
> > It started as a JDK 1.2 codebase, so not used all over the place.
> > We're converting piece-by-piece.
> >
> >
> > > @SuppressWarning("unchecked") is not used (should we start using
> > > this when converting to generics is not an option? Eclipse whine
> > > much for some classes because of this).
> >
> >
> > Happy to have it used where necessary.  Ditto @Override.  (Again, it
> > wasn't a Java 5.0 codebase 'til relatively recently.)
> >
> > Is there any other rule to follow?
> >
> >
> > Some obvious ones - no calls to System.out/err.println, don't discard
> > exceptions (unless it's entirely intentional - log them instead).
> > Also,
> > 2 space indent, no use of tabs allowed at all.  I'm sure I'll think of
> > others.
> >
> > Can someone wikify this?
> >
> > Thanks,
> > Adam
> >
> >
>
>
> --
> Matthias Wessendorf
>
> futher stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>
>


-- 
Matthias Wessendorf

futher stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Mime
View raw message