You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Simon Kitching <sk...@apache.org> on 2006/02/15 21:46:26 UTC

Re: Removing public from interface

On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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...



Re: Removing public from interface

Posted by Bernd Bohmann <be...@atanion.com>.
My proposal is only a starting point.
But at the end I would like to have a widely accepted coding style for 
MyFaces.

I can accept the developer guidelines in the MyFaces wiki:

http://wiki.apache.org/myfaces/MyFaces_Developer_Notes

There is already a reference to the Sun Codestyle.

Have you never read the Developer Notes?
Or is this section not accepted by the community.

My last question:

What is wrong with the Sun codestyle?

I will volunteering the code style.

Sean Schofield schrieb:

> The key to MyFaces being a successful project is being flexible. 
> Everyone needs to compromise.  So you can't be disappointed everytime
> things do not turn out the way you want.  Sometimes people will see it
> your way.  Sometimes they will not.  If you are open minded about
> things and learn to live with compromises you will have more fun on
> this project.  (By the way, I have changed my mind on one of our
> earlier disagreements and now agree with you - more on that in another
> thread.)
I have accepted how the maven stuff is organized but I would not fight 
for it :-)

But I don't see a accepted coding standard some code has leading braces 
some not some has _ some not.

> 
> I *personally* do not like the '_' style.  I do not use it in my code
> and I've never worked on a java project (until this one) that has.

Maybe other developer has the same opinion.

> That does not stop me from just following the informal standard that
> exists now and use it (when I remember to.)
> 
I'm new to MyFaces and I asked is there any consense about the codestyle.


> Lets all agree that in the end its more important that there be a
> standard rather then what that standard is.  I'm ok with whatever you
> guys come up with (including the Sun style) but I won't be spending
> any time volunteering to refactor things for code style since I can
> easily live with what we have.

I won't force you to refactor the code but I hope you will help to 
define the accepted MyFaces coding standard.

> 
> Sean
> 

Bernd

Re: Removing public from interface

Posted by Sean Schofield <se...@gmail.com>.
MyFaces is its own project.  There are general guidelines and
principals that we follow but there are not many hard and fast rules
other then "the community gets to decide."  So if the community wants
to use "_" or whatever else it is that is upsetting you, then that is
how it will be.  It doesn't matter what Sun or anyone else says.

Since you are a valuable contributing member of the community, you get
to help us make that decision.  If you are proposing Sun's style, that
is fine but we don't have to accept it just because Sun likes it. 
True, it is a known standard but its not the only way of doing things.

The key to MyFaces being a successful project is being flexible. 
Everyone needs to compromise.  So you can't be disappointed everytime
things do not turn out the way you want.  Sometimes people will see it
your way.  Sometimes they will not.  If you are open minded about
things and learn to live with compromises you will have more fun on
this project.  (By the way, I have changed my mind on one of our
earlier disagreements and now agree with you - more on that in another
thread.)

I *personally* do not like the '_' style.  I do not use it in my code
and I've never worked on a java project (until this one) that has. 
That does not stop me from just following the informal standard that
exists now and use it (when I remember to.)

Lets all agree that in the end its more important that there be a
standard rather then what that standard is.  I'm ok with whatever you
guys come up with (including the Sun style) but I won't be spending
any time volunteering to refactor things for code style since I can
easily live with what we have.

Sean



On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> My real question is:
> If everybody is unhappy with the codestyle of MyFaces, why we don't
> change the code.
> We should define a codestyle
> My proposal is this:
>
> http://svn.apache.org/repos/asf/myfaces/maven/trunk/build-tools/src/main/resources/org/apache/myfaces/checkstyle.xml
>
> It should be the sun codestyle with some extra checks.
>
> I will help to change the code in MyFaces. I'm not able to change all
> the code but I'm able to change the code in one or two subprojects of
> myfaces.
>
> I'm disappointed about statements like:
> MyFaces is going a different way.
>
> I will go the Apache way but sometimes I don't understand the MyFaces way.
>
> Martin Marinschek schrieb:
> > I'm having a good laugh here ;)
> >
> > It's interesting how long we can keep ourselves busy with something like that.
> >
> > For the interested - a short history of the "_" in MyFaces:
> >
> > MyFaces was originally started as a project for an inhouse-application
> > of the OeKB (http://www.oekb.at), and the OeKB has this internal
> > code-style rules which prescribe an "_" in front of private fields
> > (yes, exactly for the VI-editor users under the OeKB developers, yes,
> > there are still some ;). Now when the project went to SourceForge, no
> > one did take the time to change this, and when we went further to the
> > ASF, no one thought about that as well.
> >
> > So this is why we have this _ in place right now - as my most
> > preferred IDE (IntelliJ) copes with this real well (you change a
> > setting, and you have _ support in place), this is not a religious
> > thing for me.
> >
> > I don't have a problem if someone goes through all the code and does a
> > clean-up - but do we really want to do that?
> >
> > Bernd - even though you're disappointed - would you really take the
> > time to clean that up?
> >
> > Wouldn't be too easy, right?
> >
> > regards,
> >
> > Martin
> >
> > On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> >
> >>Why we should stick with the '_'?
> >>
> >>The Apache Code Style is the Sun Code Style without allowing tabs.
> >>MyFaces is the first project that used the '_'. (so far I can see)
> >>The Sun Code Style doesn't allow the '_'.
> >>
> >>And I would never accept code without braces.
> >>
> >>Sean Schofield schrieb:
> >>
> >>>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.
> >>
> >>XXXXXXXXXX
> >>
> >>Why should the code style doesn't fit with my personal preferences and
> >>what is wrong with the Sun way?
> >>Why we need stick? Are you using vi?
> >>
> >>
> >>
> >>>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.
> >>>
> >>
> >>The current MyFaces codestyle is very ugly.
> >>
> >>
> >>>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.
> >>
> >>What is about the tobago stuff? Have you ever looked at the tobago code?
> >>You don't like the tobago code style?
> >>
> >>>Sean
> >>>
> >>
> >>I'm very disappointed
> >>
> >>Bernd
> >>
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
> --
> Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
> Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
> phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
>

Re: Removing public from interface

Posted by Bernd Bohmann <be...@atanion.com>.
My real question is:
If everybody is unhappy with the codestyle of MyFaces, why we don't 
change the code.
We should define a codestyle
My proposal is this:

http://svn.apache.org/repos/asf/myfaces/maven/trunk/build-tools/src/main/resources/org/apache/myfaces/checkstyle.xml

It should be the sun codestyle with some extra checks.

I will help to change the code in MyFaces. I'm not able to change all 
the code but I'm able to change the code in one or two subprojects of 
myfaces.

I'm disappointed about statements like:
MyFaces is going a different way.

I will go the Apache way but sometimes I don't understand the MyFaces way.

Martin Marinschek schrieb:
> I'm having a good laugh here ;)
> 
> It's interesting how long we can keep ourselves busy with something like that.
> 
> For the interested - a short history of the "_" in MyFaces:
> 
> MyFaces was originally started as a project for an inhouse-application
> of the OeKB (http://www.oekb.at), and the OeKB has this internal
> code-style rules which prescribe an "_" in front of private fields
> (yes, exactly for the VI-editor users under the OeKB developers, yes,
> there are still some ;). Now when the project went to SourceForge, no
> one did take the time to change this, and when we went further to the
> ASF, no one thought about that as well.
> 
> So this is why we have this _ in place right now - as my most
> preferred IDE (IntelliJ) copes with this real well (you change a
> setting, and you have _ support in place), this is not a religious
> thing for me.
> 
> I don't have a problem if someone goes through all the code and does a
> clean-up - but do we really want to do that?
> 
> Bernd - even though you're disappointed - would you really take the
> time to clean that up?
> 
> Wouldn't be too easy, right?
> 
> regards,
> 
> Martin
> 
> On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> 
>>Why we should stick with the '_'?
>>
>>The Apache Code Style is the Sun Code Style without allowing tabs.
>>MyFaces is the first project that used the '_'. (so far I can see)
>>The Sun Code Style doesn't allow the '_'.
>>
>>And I would never accept code without braces.
>>
>>Sean Schofield schrieb:
>>
>>>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.
>>
>>XXXXXXXXXX
>>
>>Why should the code style doesn't fit with my personal preferences and
>>what is wrong with the Sun way?
>>Why we need stick? Are you using vi?
>>
>>
>>
>>>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.
>>>
>>
>>The current MyFaces codestyle is very ugly.
>>
>>
>>>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.
>>
>>What is about the tobago stuff? Have you ever looked at the tobago code?
>>You don't like the tobago code style?
>>
>>>Sean
>>>
>>
>>I'm very disappointed
>>
>>Bernd
>>
> 
> 
> 
> --
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 

-- 
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333

Re: Removing public from interface

Posted by Manfred Geiler <ma...@gmail.com>.
Ok, here is my 0.02 although I strongly agree with Martin that there a
many many many other questions and issues to solve, that deserve our
energy and work mania more than this underscore thingy.

 * I have heard two real pro arguments from Adam that need not (but
could!) help other people read someone else's code easier and prevent
from risky and difficult to find errors when someone forgets the
"this." in a place where it should be.
 * Cons? What is a real con argument? Some people find it ugly? Sun
said so in 1999?

No objection against a new coding convention voting in general. But I
have a feeling that we might soon end in deadlock situations. And
please please please: Let us do our homework first: Release, TCK
testing, Homepage, ...

Thanks,
Manfred



On 2/18/06, Adam Winer <aw...@gmail.com> wrote:
> On 2/18/06, Volker Weber <us...@weber-oldenburg.de> wrote:
> > Hi,
> >
> > we have currently different code styles applied:
> > There are many classes in tomahawk which don't prefix private fields
> > with '_'.
> > Tobago don't use the '_'.
> > Haven't looked into adf yet.
> >
> > I don't think we should stick with what we *most* have (has anyone
> > counted what we have most, including adf and tobago?).
> >
> > Is there any actual reason prefixing private fields with '_'? Any active
> > developers using vi?
>
> We've done it on the ADF Faces source code for ages,
> and VI has nothing to do with it - it has everything to do
> with making it very easy to read someone else's code and
> understand it as quickly as possible.  Using "this."
> when there is a local variable with the same name is
> a hideous convention - unless you *always* use this. to
> access an instance variable, whether or not there is a
> conflict.   That's because when you look at a block
> of code, you have no idea what's a local variable and
> what's an instance variable without re-scanning the code.
>
> I've never given much of a whit for the Sun coding standards -
> they're largely based on the K&R C coding style (Kernighan
> and Ritchie, and I'm dating myself here I know), which was
> an attempt to save as much space as possible on 80x24
> terminal monitors.  We don't use 80x24 terminals anymore.
>
> > Why don't have a codestyle which came as near as posible to the personal
> > preferences of *most* developers?
> >
> > BTW: I prefer to have public in interfaces, and i dislike opening braces
> > on newlines.
>
> I like opening braces on newlines, as it makes it much easier to line
> them up mentally.  I've never heard a reason for keeping opening
> braces on the same line other than "it saves space", which isn't
> much of reason with today's monitor sizes.
>
> -- Adam
>
>
> >
> > Regards,
> >   Volker
> >
> >
> > Martin Marinschek wrote:
> > > I'm having a good laugh here ;)
> > >
> > > It's interesting how long we can keep ourselves busy with something like that.
> > >
> > > For the interested - a short history of the "_" in MyFaces:
> > >
> > > MyFaces was originally started as a project for an inhouse-application
> > > of the OeKB (http://www.oekb.at), and the OeKB has this internal
> > > code-style rules which prescribe an "_" in front of private fields
> > > (yes, exactly for the VI-editor users under the OeKB developers, yes,
> > > there are still some ;). Now when the project went to SourceForge, no
> > > one did take the time to change this, and when we went further to the
> > > ASF, no one thought about that as well.
> > >
> > > So this is why we have this _ in place right now - as my most
> > > preferred IDE (IntelliJ) copes with this real well (you change a
> > > setting, and you have _ support in place), this is not a religious
> > > thing for me.
> > >
> > > I don't have a problem if someone goes through all the code and does a
> > > clean-up - but do we really want to do that?
> > >
> > > Bernd - even though you're disappointed - would you really take the
> > > time to clean that up?
> > >
> > > Wouldn't be too easy, right?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> > >
> > >>Why we should stick with the '_'?
> > >>
> > >>The Apache Code Style is the Sun Code Style without allowing tabs.
> > >>MyFaces is the first project that used the '_'. (so far I can see)
> > >>The Sun Code Style doesn't allow the '_'.
> > >>
> > >>And I would never accept code without braces.
> > >>
> > >>Sean Schofield schrieb:
> > >>
> > >>>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.
> > >>
> > >>XXXXXXXXXX
> > >>
> > >>Why should the code style doesn't fit with my personal preferences and
> > >>what is wrong with the Sun way?
> > >>Why we need stick? Are you using vi?
> > >>
> > >>
> > >>
> > >>>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.
> > >>>
> > >>
> > >>The current MyFaces codestyle is very ugly.
> > >>
> > >>
> > >>>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.
> > >>
> > >>What is about the tobago stuff? Have you ever looked at the tobago code?
> > >>You don't like the tobago code style?
> > >>
> > >>>Sean
> > >>>
> > >>
> > >>I'm very disappointed
> > >>
> > >>Bernd
> > >>
> > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> > --
> > Don't answer to From: address!
> > Mail to this account are droped if not recieved via mailinglist.
> > To contact me direct create the mail address by
> > concatenating my forename to my senders domain.
> >
>

Re: Removing public from interface

Posted by Adam Winer <aw...@gmail.com>.
On 2/18/06, Volker Weber <us...@weber-oldenburg.de> wrote:
> Hi,
>
> we have currently different code styles applied:
> There are many classes in tomahawk which don't prefix private fields
> with '_'.
> Tobago don't use the '_'.
> Haven't looked into adf yet.
>
> I don't think we should stick with what we *most* have (has anyone
> counted what we have most, including adf and tobago?).
>
> Is there any actual reason prefixing private fields with '_'? Any active
> developers using vi?

We've done it on the ADF Faces source code for ages,
and VI has nothing to do with it - it has everything to do
with making it very easy to read someone else's code and
understand it as quickly as possible.  Using "this."
when there is a local variable with the same name is
a hideous convention - unless you *always* use this. to
access an instance variable, whether or not there is a
conflict.   That's because when you look at a block
of code, you have no idea what's a local variable and
what's an instance variable without re-scanning the code.

I've never given much of a whit for the Sun coding standards -
they're largely based on the K&R C coding style (Kernighan
and Ritchie, and I'm dating myself here I know), which was
an attempt to save as much space as possible on 80x24
terminal monitors.  We don't use 80x24 terminals anymore.

> Why don't have a codestyle which came as near as posible to the personal
> preferences of *most* developers?
>
> BTW: I prefer to have public in interfaces, and i dislike opening braces
> on newlines.

I like opening braces on newlines, as it makes it much easier to line
them up mentally.  I've never heard a reason for keeping opening
braces on the same line other than "it saves space", which isn't
much of reason with today's monitor sizes.

-- Adam


>
> Regards,
>   Volker
>
>
> Martin Marinschek wrote:
> > I'm having a good laugh here ;)
> >
> > It's interesting how long we can keep ourselves busy with something like that.
> >
> > For the interested - a short history of the "_" in MyFaces:
> >
> > MyFaces was originally started as a project for an inhouse-application
> > of the OeKB (http://www.oekb.at), and the OeKB has this internal
> > code-style rules which prescribe an "_" in front of private fields
> > (yes, exactly for the VI-editor users under the OeKB developers, yes,
> > there are still some ;). Now when the project went to SourceForge, no
> > one did take the time to change this, and when we went further to the
> > ASF, no one thought about that as well.
> >
> > So this is why we have this _ in place right now - as my most
> > preferred IDE (IntelliJ) copes with this real well (you change a
> > setting, and you have _ support in place), this is not a religious
> > thing for me.
> >
> > I don't have a problem if someone goes through all the code and does a
> > clean-up - but do we really want to do that?
> >
> > Bernd - even though you're disappointed - would you really take the
> > time to clean that up?
> >
> > Wouldn't be too easy, right?
> >
> > regards,
> >
> > Martin
> >
> > On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> >
> >>Why we should stick with the '_'?
> >>
> >>The Apache Code Style is the Sun Code Style without allowing tabs.
> >>MyFaces is the first project that used the '_'. (so far I can see)
> >>The Sun Code Style doesn't allow the '_'.
> >>
> >>And I would never accept code without braces.
> >>
> >>Sean Schofield schrieb:
> >>
> >>>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.
> >>
> >>XXXXXXXXXX
> >>
> >>Why should the code style doesn't fit with my personal preferences and
> >>what is wrong with the Sun way?
> >>Why we need stick? Are you using vi?
> >>
> >>
> >>
> >>>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.
> >>>
> >>
> >>The current MyFaces codestyle is very ugly.
> >>
> >>
> >>>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.
> >>
> >>What is about the tobago stuff? Have you ever looked at the tobago code?
> >>You don't like the tobago code style?
> >>
> >>>Sean
> >>>
> >>
> >>I'm very disappointed
> >>
> >>Bernd
> >>
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.
>

Re: Removing public from interface

Posted by Volker Weber <us...@weber-oldenburg.de>.
Martin Marinschek wrote:
> Ok,
> 
> Volker, are you annoyed with this enough to go through the existing
> code and remove all _ and replace them with this. statements, where
> necessary?

Is it a prerequisite converting existing code before we can agree to
another convention? If so than it sould also a prerequisite to convert
all existing code do follow this, before we agree to hold such a convention.

I personaly have no problem with leading '_', nor with most other
conventions which don't fit my preferences.
But according to
http://wiki.apache.org/myfaces/MyFaces_Developer_Notes
we should use suns code conventions for everything not documented
otherwhere. I can't find any rule to use '_' as prefix. And sun
explicitly ban this.
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html




Sean Schofield wrote:
> Lets all agree that in the end its more important that there be a
> standard rather then what that standard is.  I'm ok with whatever you
> guys come up with (including the Sun style) but I won't be spending
> any time volunteering to refactor things for code style since I can
> easily live with what we have.

full ACK

regards,
  Volker

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Re: Removing public from interface

Posted by Martin Marinschek <ma...@gmail.com>.
Ok,

Volker, are you annoyed with this enough to go through the existing
code and remove all _ and replace them with this. statements, where
necessary?

regards,

Martin

On 2/18/06, Volker Weber <us...@weber-oldenburg.de> wrote:
> Hi,
>
> we have currently different code styles applied:
> There are many classes in tomahawk which don't prefix private fields
> with '_'.
> Tobago don't use the '_'.
> Haven't looked into adf yet.
>
> I don't think we should stick with what we *most* have (has anyone
> counted what we have most, including adf and tobago?).
>
> Is there any actual reason prefixing private fields with '_'? Any active
> developers using vi?
>
> Why don't have a codestyle which came as near as posible to the personal
> preferences of *most* developers?
>
> BTW: I prefer to have public in interfaces, and i dislike opening braces
> on newlines.
>
> Regards,
>   Volker
>
>
> Martin Marinschek wrote:
> > I'm having a good laugh here ;)
> >
> > It's interesting how long we can keep ourselves busy with something like that.
> >
> > For the interested - a short history of the "_" in MyFaces:
> >
> > MyFaces was originally started as a project for an inhouse-application
> > of the OeKB (http://www.oekb.at), and the OeKB has this internal
> > code-style rules which prescribe an "_" in front of private fields
> > (yes, exactly for the VI-editor users under the OeKB developers, yes,
> > there are still some ;). Now when the project went to SourceForge, no
> > one did take the time to change this, and when we went further to the
> > ASF, no one thought about that as well.
> >
> > So this is why we have this _ in place right now - as my most
> > preferred IDE (IntelliJ) copes with this real well (you change a
> > setting, and you have _ support in place), this is not a religious
> > thing for me.
> >
> > I don't have a problem if someone goes through all the code and does a
> > clean-up - but do we really want to do that?
> >
> > Bernd - even though you're disappointed - would you really take the
> > time to clean that up?
> >
> > Wouldn't be too easy, right?
> >
> > regards,
> >
> > Martin
> >
> > On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> >
> >>Why we should stick with the '_'?
> >>
> >>The Apache Code Style is the Sun Code Style without allowing tabs.
> >>MyFaces is the first project that used the '_'. (so far I can see)
> >>The Sun Code Style doesn't allow the '_'.
> >>
> >>And I would never accept code without braces.
> >>
> >>Sean Schofield schrieb:
> >>
> >>>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.
> >>
> >>XXXXXXXXXX
> >>
> >>Why should the code style doesn't fit with my personal preferences and
> >>what is wrong with the Sun way?
> >>Why we need stick? Are you using vi?
> >>
> >>
> >>
> >>>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.
> >>>
> >>
> >>The current MyFaces codestyle is very ugly.
> >>
> >>
> >>>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.
> >>
> >>What is about the tobago stuff? Have you ever looked at the tobago code?
> >>You don't like the tobago code style?
> >>
> >>>Sean
> >>>
> >>
> >>I'm very disappointed
> >>
> >>Bernd
> >>
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Removing public from interface

Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi,

we have currently different code styles applied:
There are many classes in tomahawk which don't prefix private fields
with '_'.
Tobago don't use the '_'.
Haven't looked into adf yet.

I don't think we should stick with what we *most* have (has anyone
counted what we have most, including adf and tobago?).

Is there any actual reason prefixing private fields with '_'? Any active
developers using vi?

Why don't have a codestyle which came as near as posible to the personal
preferences of *most* developers?

BTW: I prefer to have public in interfaces, and i dislike opening braces
on newlines.

Regards,
  Volker


Martin Marinschek wrote:
> I'm having a good laugh here ;)
> 
> It's interesting how long we can keep ourselves busy with something like that.
> 
> For the interested - a short history of the "_" in MyFaces:
> 
> MyFaces was originally started as a project for an inhouse-application
> of the OeKB (http://www.oekb.at), and the OeKB has this internal
> code-style rules which prescribe an "_" in front of private fields
> (yes, exactly for the VI-editor users under the OeKB developers, yes,
> there are still some ;). Now when the project went to SourceForge, no
> one did take the time to change this, and when we went further to the
> ASF, no one thought about that as well.
> 
> So this is why we have this _ in place right now - as my most
> preferred IDE (IntelliJ) copes with this real well (you change a
> setting, and you have _ support in place), this is not a religious
> thing for me.
> 
> I don't have a problem if someone goes through all the code and does a
> clean-up - but do we really want to do that?
> 
> Bernd - even though you're disappointed - would you really take the
> time to clean that up?
> 
> Wouldn't be too easy, right?
> 
> regards,
> 
> Martin
> 
> On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> 
>>Why we should stick with the '_'?
>>
>>The Apache Code Style is the Sun Code Style without allowing tabs.
>>MyFaces is the first project that used the '_'. (so far I can see)
>>The Sun Code Style doesn't allow the '_'.
>>
>>And I would never accept code without braces.
>>
>>Sean Schofield schrieb:
>>
>>>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.
>>
>>XXXXXXXXXX
>>
>>Why should the code style doesn't fit with my personal preferences and
>>what is wrong with the Sun way?
>>Why we need stick? Are you using vi?
>>
>>
>>
>>>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.
>>>
>>
>>The current MyFaces codestyle is very ugly.
>>
>>
>>>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.
>>
>>What is about the tobago stuff? Have you ever looked at the tobago code?
>>You don't like the tobago code style?
>>
>>>Sean
>>>
>>
>>I'm very disappointed
>>
>>Bernd
>>
> 
> 
> 
> --
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Re: Removing public from interface

Posted by Martin Marinschek <ma...@gmail.com>.
I'm having a good laugh here ;)

It's interesting how long we can keep ourselves busy with something like that.

For the interested - a short history of the "_" in MyFaces:

MyFaces was originally started as a project for an inhouse-application
of the OeKB (http://www.oekb.at), and the OeKB has this internal
code-style rules which prescribe an "_" in front of private fields
(yes, exactly for the VI-editor users under the OeKB developers, yes,
there are still some ;). Now when the project went to SourceForge, no
one did take the time to change this, and when we went further to the
ASF, no one thought about that as well.

So this is why we have this _ in place right now - as my most
preferred IDE (IntelliJ) copes with this real well (you change a
setting, and you have _ support in place), this is not a religious
thing for me.

I don't have a problem if someone goes through all the code and does a
clean-up - but do we really want to do that?

Bernd - even though you're disappointed - would you really take the
time to clean that up?

Wouldn't be too easy, right?

regards,

Martin

On 2/18/06, Bernd Bohmann <be...@atanion.com> wrote:
> Why we should stick with the '_'?
>
> The Apache Code Style is the Sun Code Style without allowing tabs.
> MyFaces is the first project that used the '_'. (so far I can see)
> The Sun Code Style doesn't allow the '_'.
>
> And I would never accept code without braces.
>
> Sean Schofield schrieb:
> > 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.
>
> XXXXXXXXXX
>
> Why should the code style doesn't fit with my personal preferences and
> what is wrong with the Sun way?
> Why we need stick? Are you using vi?
>
>
> >
> > 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.
> >
> The current MyFaces codestyle is very ugly.
>
> > 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.
>
> What is about the tobago stuff? Have you ever looked at the tobago code?
> You don't like the tobago code style?
> >
> > Sean
> >
>
> I'm very disappointed
>
> Bernd
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Removing public from interface

Posted by Bernd Bohmann <be...@atanion.com>.
Why we should stick with the '_'?

The Apache Code Style is the Sun Code Style without allowing tabs.
MyFaces is the first project that used the '_'. (so far I can see)
The Sun Code Style doesn't allow the '_'.

And I would never accept code without braces.

Sean Schofield schrieb:
> 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.

XXXXXXXXXX

Why should the code style doesn't fit with my personal preferences and 
what is wrong with the Sun way?
Why we need stick? Are you using vi?


> 
> 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.
> 
The current MyFaces codestyle is very ugly.

> 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.

What is about the tobago stuff? Have you ever looked at the tobago code? 
You don't like the tobago code style?
> 
> Sean
> 

I'm very disappointed

Bernd

Re: Removing public from interface

Posted by Sean Schofield <se...@gmail.com>.
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 <aw...@gmail.com> 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 <mw...@gmail.com> 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 <br...@gmail.com> 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 <mw...@gmail.com> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > > > > > Yup.  We also use the optional { } around if else statements in this
> > > > > > > project for similar reasons.
> > > > > > >
> > > > > > > Sean
> > > > > > >
> > > > > > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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
> >
>

Re: Removing public from interface

Posted by Adam Winer <aw...@gmail.com>.
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 <mw...@gmail.com> 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 <br...@gmail.com> 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 <mw...@gmail.com> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > > > > Yup.  We also use the optional { } around if else statements in this
> > > > > > project for similar reasons.
> > > > > >
> > > > > > Sean
> > > > > >
> > > > > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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
>

Re: Removing public from interface

Posted by Manfred Geiler <ma...@gmail.com>.
Cool!
I still have my Sinclair ZX81 in the attic.
Can you give me the right compiler directives?
:-)

Manfred


On 2/17/06, Bruno Aranda <br...@gmail.com> wrote:
> I work with my Spectrum ZX80, which runs pretty smooth ;-)
>
> On 2/17/06, Manfred Geiler <ma...@gmail.com> wrote:
> > On 2/17/06, Matthias Wessendorf <mw...@gmail.com> wrote:
> > > > I am with you Matthias ;-) I prefer to use 'this'...
> > > >
> > >
> > > expect, you are using vi ... :-))
> > >
> >
> > on a monochrom display...
> > :-)))))
> >
> > Manfred
> >
>

Re: Removing public from interface

Posted by Bruno Aranda <br...@gmail.com>.
I work with my Spectrum ZX80, which runs pretty smooth ;-)

On 2/17/06, Manfred Geiler <ma...@gmail.com> wrote:
> On 2/17/06, Matthias Wessendorf <mw...@gmail.com> wrote:
> > > I am with you Matthias ;-) I prefer to use 'this'...
> > >
> >
> > expect, you are using vi ... :-))
> >
>
> on a monochrom display...
> :-)))))
>
> Manfred
>

Re: Removing public from interface

Posted by Manfred Geiler <ma...@gmail.com>.
On 2/17/06, Matthias Wessendorf <mw...@gmail.com> wrote:
> > I am with you Matthias ;-) I prefer to use 'this'...
> >
>
> expect, you are using vi ... :-))
>

on a monochrom display...
:-)))))

Manfred

Re: Removing public from interface

Posted by Matthias Wessendorf <mw...@gmail.com>.
> I am with you Matthias ;-) I prefer to use 'this'...
>

expect, you are using vi ... :-))

Re: Removing public from interface

Posted by Bruno Aranda <br...@gmail.com>.
I am with you Matthias ;-) I prefer to use 'this'...

Bruno

On 2/17/06, Matthias Wessendorf <mw...@gmail.com> 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 <br...@gmail.com> 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 <mw...@gmail.com> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > > > > Yup.  We also use the optional { } around if else statements in this
> > > > > > project for similar reasons.
> > > > > >
> > > > > > Sean
> > > > > >
> > > > > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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
>

Re: Removing public from interface

Posted by Matthias Wessendorf <mw...@gmail.com>.
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 <br...@gmail.com> 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 <mw...@gmail.com> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > > > Yup.  We also use the optional { } around if else statements in this
> > > > > project for similar reasons.
> > > > >
> > > > > Sean
> > > > >
> > > > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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

Re: Removing public from interface

Posted by Bruno Aranda <br...@gmail.com>.
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 <mw...@gmail.com> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > > Yup.  We also use the optional { } around if else statements in this
> > > > project for similar reasons.
> > > >
> > > > Sean
> > > >
> > > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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
>

Re: Removing public from interface

Posted by Matthias Wessendorf <mw...@gmail.com>.
> 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 <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > > Yup.  We also use the optional { } around if else statements in this
> > > project for similar reasons.
> > >
> > > Sean
> > >
> > > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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

Re: Removing public from interface

Posted by Adam Winer <aw...@gmail.com>.
I agree with Simon;  it's better to be explicit.  I can't
see a solid justification for omitting them.  I do,
however, dislike seeing "abstract" prepended.

If nothing else, including "public" (and excluding
"abstract") makes it easier to cut-and-paste from an
interface into a class implementing the interface.

-- Adam


On 2/15/06, Martin Marinschek <ma...@gmail.com> 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 <se...@gmail.com> wrote:
> > Yup.  We also use the optional { } around if else statements in this
> > project for similar reasons.
> >
> > Sean
> >
> > On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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
>

Re: Removing public from interface

Posted by Martin Marinschek <ma...@gmail.com>.
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 <se...@gmail.com> wrote:
> Yup.  We also use the optional { } around if else statements in this
> project for similar reasons.
>
> Sean
>
> On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> > On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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

Re: Removing public from interface

Posted by Sean Schofield <se...@gmail.com>.
Yup.  We also use the optional { } around if else statements in this
project for similar reasons.

Sean

On 2/15/06, Simon Kitching <sk...@apache.org> wrote:
> On Wed, 2006-02-15 at 12:31 -0500, Mike Kienenberger wrote:
> > On 2/15/06, Matthias Wessendorf <mw...@gmail.com> 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...
>
>
>