You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Manfred Geiler <ma...@apache.org> on 2007/10/01 10:15:54 UTC

Re: [jira] Commented: (JSR301-2) Coding Standards: This project should adopt coding standards similar to MyFaces for consistancy

I like the "Exceptions" section in the Geronimo Coding standards very much.
We should have these "rules" in our conventions as well. Hope they are
open source... ;-)

There is just one issue I would not recommend due to personal experience:
Abbreviations and Acronyms should *always* appear in CamelHumps style.
Although an acronym might be recognized faster if it is written in all
uppercase, you run into nasty problems with bean properties:
  interface Foo {
      String getEJBRef();
  }
Now you want to reference this property from an EL expression.
Sixty-four-dollar question: What is the right bean property name?
 1. ejbRef
 2. eJBRef
 3. EJBRef
 4. EjbRef
Well, there is an unique answer according to the JavaBeans spec.
Guess, which one? Is it really intuitional? And: Does it look "right"?

Though a getter method "getEjbRef()" does not look common at first
sight, the question how to access it via EL never arises.


--Manfred




On 9/29/07, Martin Marinschek <ma...@gmail.com> wrote:
> If it follows the sun coding conventions, leave it be.
>
> regards,
>
> Martin
>
> On 9/28/07, Scott O'Bryan <da...@gmail.com> wrote:
> > Fair enough because frankly it's a daunting project.  I was thinking,
> > however, that we could allow the code to look like MyFaces at least
> > somewhat.
> >
> > But if people think the current code is fine, I'm game with using it.
> >
> > Scott
> >
> > Martin Marinschek wrote:
> > > There have been a lot of discussions on coding conventions here at
> > > MyFaces. I don't think we've reached an agreement so far ;)
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 9/28/07, Matthias Weßendorf (JIRA) <de...@myfaces.apache.org> wrote:
> > >
> > >>     [ https://issues.apache.org/jira/browse/JSR301-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531030 ]
> > >>
> > >> Matthias Weßendorf commented on JSR301-2:
> > >> -----------------------------------------
> > >>
> > >> I think that is only true for Trinidad :)
> > >>
> > >>
> > >>> Coding Standards: This project should adopt coding standards similar to MyFaces for consistancy
> > >>> -----------------------------------------------------------------------------------------------
> > >>>
> > >>>                 Key: JSR301-2
> > >>>                 URL: https://issues.apache.org/jira/browse/JSR301-2
> > >>>             Project: MyFaces Portlet Bridge
> > >>>          Issue Type: Improvement
> > >>>          Components: General
> > >>>    Affects Versions: 1.0.0-SNAPSHOT
> > >>>            Reporter: Scott O'Bryan
> > >>>             Fix For: 1.0.0-SNAPSHOT
> > >>>
> > >>>
> > >>> In order to maintain consistency with the MyFaces codebase, this code donation should follow similar coding standards to other MyFaces projects.  Most notably:
> > >>> * private methods and properties use a leading underscore
> > >>> * static properties are all uppercase and underscore seperated
> > >>> * indentation is 2 spaces with no "tabs"
> > >>> Other coding standards can be developed by convention.
> > >>>
> > >> --
> > >> This message is automatically generated by JIRA.
> > >> -
> > >> You can reply to this email to add a comment to the issue online.
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces