Coding standards...

24 views
Skip to first unread message

Robert Hanson

unread,
Dec 13, 2006, 9:01:32 AM12/13/06
to gwt-c...@googlegroups.com
Has anyone taken a look at the GWT standards? I am not suggesting
that we start again from scratch, but perhaps there is something in
there that we don't have in ours.

http://code.google.com/webtoolkit/makinggwtbetter.html

One thing that stuck out at me was the naming of test cases. The
TestCase class has the same name as the class it is testing with the
name "Test" appended to the end. The test is also in the same package
as the class it is testing.

As for my time... it looks like I will have time sooner than I
thought, but that is still weeks away. Frankly I can't wait to get
back to doing some coding.

Rob

Jason Essington

unread,
Dec 13, 2006, 10:31:56 AM12/13/06
to gwt-c...@googlegroups.com
Actually, as an extension to GWT I think gwt-commons should adopt
those standards as is.

I realize that everyone has their own ideas about coding standards,
but for a project such as this where our sole purpose is to extend
some parent toolkit, we should emulate the parent as closely as
possible.

-jason

Robert Hanson

unread,
Dec 13, 2006, 10:57:12 AM12/13/06
to gwt-c...@googlegroups.com
I don't have issue with that (even without fully examining their
standard)... but I am sure someone will.

Does anyone have issue with adopting the Google coding practices?

Rob

ash

unread,
Dec 13, 2006, 2:59:01 PM12/13/06
to gwt-commons

Robert Hanson wrote:
> I don't have issue with that (even without fully examining their
> standard)... but I am sure someone will.
lol, is that a subtle way of referring to me rob?

> Does anyone have issue with adopting the Google coding practices?

for me, not at all. i briefly chatted with jason about this yesterday
and the argument is compelling.

rgds ash
http://www.gworks.com.au

g.georgo...@gmail.com

unread,
Dec 14, 2006, 1:24:35 AM12/14/06
to gwt-commons
I am very bad at following any rule if it is not imposed automatically
by my IDE :P
If someone could create a coding rule set for the eclipse formatter
I'll use it - otherwise get prepared for some really ugly commits!

Bruce Johnson

unread,
Dec 14, 2006, 8:16:45 AM12/14/06
to gwt-c...@googlegroups.com
Hey guys,

I think it's great that you'd consider using the same coding standards we're using in GWT. We took a completely non-religious approach in deciding the style, and in fact our criteria were merely pragmatic questions like:

- How easy is it to do automated sort+format in an IDE?
- Can we write checkstyle rules to enforce it?
- How does it affect diffs and merges?

We checked in all that stuff (for Eclipse, anyway), along with instructions to set it up:
http://google-web-toolkit.googlecode.com/svn/trunk/eclipse/settings/code-style/

Just yell if you have any problems getting it set up.

-- Bruce

Robert Hanson

unread,
Dec 14, 2006, 8:50:37 AM12/14/06
to gwt-c...@googlegroups.com
Ash wrote:
> lol, is that a subtle way of referring to me rob?

Well... yeah :) I know that you have some strong convictions when it
comes to coding standards.

Bruce Johnson wrote:
> We checked in all that stuff (for Eclipse, anyway),
> along with instructions to set it up:

Thanks Bruce (and the team). That should make things a bit easier.

Rob

Jason Essington

unread,
Dec 14, 2006, 10:24:09 AM12/14/06
to gwt-c...@googlegroups.com
I just grabbed the GWT tree yesterday, and managed to get things set
up, it was no real problem.

now it is simply a matter of adding those style rules to our gwt-
commons projects as well.

Thanks for all the hard work Bruce (and of course, everyone else on
the GWT team)!

-jason

Reply all
Reply to author
Forward
0 new messages