Since most of the code in myfaces right now also uses the '_' I think
we should stick with it.
Everyone needs to keep in mind that the final code style that we come
up with is not going to be the same as your personal preference or
what Sun says is the "right way." There is an overall style to *most*
of the code and we need to stick with what we started.
So lets document the standards and make sure everything from this
point on conforms to those standards. Ideally the standards won't
differ much from what we already have.
Again, the "_" is not my personal favorite but it is the standard and
it has the added bonus of matching up with the ADF stuff. So lets
stick with it.
Sean
On 2/17/06, Adam Winer <[EMAIL PROTECTED]> wrote:
> I find an "_" convention extremely useful - when reading
> code, it is very helpful to know immediately what is a
> method variable and what is an instance variable.
>
> The ADF Faces conventions use "_" as a prefix
> for anything which is private (instance variables,
> methods). Makes it easy to read and understand
> the code, esp. what is the public API and what is
> the private API.
>
> -- Adam Winer
>
>
> On 2/17/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > maybe we should apply some code style conventions during maven build...
> >
> > also ... I personal don't like some *old school* doings like:
> >
> > private String _foo;
> > public void setFoo(String foo)
> > {
> > _foo = foo;
> > }
> >
> > no need for "_" ...
> >
> > I was discussion things like that with Bernd last days.
> >
> > -Matthias
> >
> > On 2/17/06, Bruno Aranda <[EMAIL PROTECTED]> wrote:
> > > Yes, I think that it is better to follow some convention. In my case,
> > > I never use public in interfaces (to me it looks like using abstract)
> > > ;-)
> > >
> > > Bruno
> > >
> > > On 2/16/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > > > > If nothing else, including "public" (and excluding
> > > > > "abstract") makes it easier to cut-and-paste from an
> > > > > interface into a class implementing the interface.
> > > >
> > > > hehe.
> > > >
> > > > Anyway, we should make it clear, which kind of *convention* we use.
> > > >
> > > > the "sun check-style" is against, using public in interfaces AFAIK.
> > > >
> > > > -Matthias
> > > >
> > > > > -- Adam
> > > > >
> > > > >
> > > > > On 2/15/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > > > > > Hmm...
> > > > > >
> > > > > > I never use public in interfaces - and with IntelliJ, you can even
> > > > > > change the settings so that you get a warning on that.
> > > > > >
> > > > > > AFAIK, it's supposed to be good code style to leave those public
> > > > > > modifiers out, but don't ask me where I've read this. Reading too
> > > > > > much
> > > > > > these days ;)
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > > On 2/15/06, Sean Schofield <[EMAIL PROTECTED]> wrote:
> > > > > > > Yup. We also use the optional { } around if else statements in
> > > > > > > this
> > > > > > > project for similar reasons.
> > > > > > >
> > > > > > > Sean
> > > > > > >
> > > > > > > On 2/15/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
> > > > > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > > > > On 2/15/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > > > > > > > > > there is no need to say "public" inside of interface
> > > > > > > > > >
> > > > > > > > > > each method defined is public and abstract
> > > > > > > > > >
> > > > > > > > > > same for constants.
> > > > > > > > > >
> > > > > > > > > > "public static final" is not needed
> > > > > > > > > > all constants are
> > > > > > > > > >
> > > > > > > > > > public static final String x = "x";
> > > > > > > > > > same as
> > > > > > > > > > String x = "x";
> > > > > > > > >
> > > > > > > > > Thanks. I suspected it might be something like that, but
> > > > > > > > > I'd never
> > > > > > > > > seen it done that way before, and wanted to make sure.
> > > > > > > >
> > > > > > > > That's why I typically use "public" and "static" keywords in
> > > > > > > > interfaces
> > > > > > > > anyway; not everyone is aware of these interface features. It
> > > > > > > > doesn't
> > > > > > > > make the bytecode any larger, and cannot be misunderstood...
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF powerhouse -
> > > > > > JSF Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > Zülpicher Wall 12, 239
> > > > 50674 Köln
> > > > http://www.wessendorf.net
> > > > mwessendorf-at-gmail-dot-com
> > > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > Zülpicher Wall 12, 239
> > 50674 Köln
> > http://www.wessendorf.net
> > mwessendorf-at-gmail-dot-com
> >
>