From adffaces-user-return-434-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Fri Jul 07 18:36:52 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 50152 invoked from network); 7 Jul 2006 18:36:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2006 18:36:51 -0000 Received: (qmail 4291 invoked by uid 500); 7 Jul 2006 18:36:51 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 4098 invoked by uid 500); 7 Jul 2006 18:36:50 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 4089 invoked by uid 99); 7 Jul 2006 18:36:50 -0000 Received-SPF: pass (hermes.apache.org: local policy) Received: from [148.87.113.118] (HELO rgminet01.oracle.com) (148.87.113.118) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 11:36:50 -0700 Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id k67IXJSp023179 for ; Fri, 7 Jul 2006 12:33:19 -0600 Received: from us.oracle.com (dhcp-4op1-2-3-4-west-130-35-26-37.us.oracle.com [130.35.26.37]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k67IXIDn016411 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 7 Jul 2006 12:33:19 -0600 From: "Pavitra Subramaniam" Reply-To: "pavitra.subramaniam@oracle.com" To: "adffaces-user@incubator.apache.org" Subject: RE: Coding conventions Date: Fri, 7 Jul 2006 11:32:47 -0700 Organization: Oracle Message-ID: <20060707113247703.00000000120@pasubra-pc> In-Reply-To: <71235db40607060915u421414f9p457899f50a693ad2@mail.gmail.com> X-Mailer: Oracle Connector for Outlook 10.1.2.0.0 71006 (11.0.5608) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 Mat= thias 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 wrote: > On 7/6/06, 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, priva= te. > 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