JavaFX Coding Conventions


I've been writing a lot of JavaFX code over the last year. After some tweaking I've arrived at a style that I like a lot. I notice that even on my team there are some variations in how people format their code, so I thought I would document what I like in case this helps others get started. (I did a quick google search and didn't find any JavaFX coding convention documents anywhere. The closest thing I found was a blog entry, but while it contains a lot of good advice, the style it recommends does not match the practice of the JavaFX team (or the Sun Java style) either). Therefore, I thought I would document what I consider good JavaFX coding conventions.



Rather than post them here in a blog entry, I placed them in a Wiki page such that they can easily be improved and kept up to date as I get feedback and in case I change my mind :)



You can find the coding conventions document here:


http://wikis.sun.com/display/JavaFxCodeConv/Home



P.S. I will be speaking at Devoxx in Antwerp, Belgium next week! Hope to meet some of you there!

Comments:

hey, love the picture under the banner! May the force be with your kids! - eduard/o

Posted by Eduardo Pelegri-Llopart on November 08, 2009 at 02:22 PM PST #

Great post!
Thank you!

Posted by oris watches on November 08, 2009 at 04:57 PM PST #

Hi Tor,
I will take a look at your coding conventions, but one thing I must admit I do not like very much is the missing "return" in your functions...
Maybe it's obvious, but I have to think over it...

I will also be at the Devoxx, will Sun show the JavaFX designer tool there ?

Thanks,
Guido

Posted by Guido on November 08, 2009 at 05:55 PM PST #

Hi Eduardo,
thank you!

Hi Guido,
yes, I may do a demo of the authoring tool at Devoxx!

Posted by Tor Norbye on November 08, 2009 at 11:22 PM PST #

Thanks a lot for this. I've seen a lot of ugly JavaFX code, and I hope that people adopt this style. I know I will.

Posted by Eric Wendelin on November 08, 2009 at 11:34 PM PST #

hi, it's frustrating looking to the buglist in jira for javafx runtime. 300 bugs - some in progres but no real closed bugs. whats going on there? why is there no information about future release of javafx? ok... the name should be soma.. what else?

it was very cool to see the effort going into javafx at the first half of 2009. but nothing happend since then... thats frustrating. what's in 1.3? when is it coming? when comes the authoring tool...? an answer from someone inside would be greate :-) thanks and cheers. t

Posted by tpepitas on November 21, 2009 at 11:36 PM PST #

As long as we are talking JavaFX coding conventions, will these conventions be used in code produced by the design tool demoed at JavaOne (Any updates? When will that be released?)

Posted by Eric Bresie on November 24, 2009 at 04:22 AM PST #

Tor, will there be a git plugin finally?

Not just the Ruby folks need it. Git is very popular and Netbeans doesn't support it.

Posted by Frank Paulsen on November 25, 2009 at 03:14 AM PST #

Thanks for your comments everyone.

Hi Frank, try http://nbgit.org/ .

Hi Eric, the authoring tool isn't code-generation oriented, but the RAD tool is and I'll definitely be pushing for these conventions there :) Though it shouldn't be controversial since most of them are the existing practice of the FX teams at Sun.

Hi tpepitas, I assure you there is a lot of progress - I'm not sure what bug numbers you're using but a lot of the JIRA data is internal so doesn't show up in public queries since we're all working off internal builds. We demoed a lot of this progress at Devoxx last week - new controls, performance improvements, graphics improvements, skinning (css) improvements, etc.

I unfortunately cannot talk about the schedule... But I can tell you "nothing happened since then" is far from the truth.

Posted by Tor Norbye on November 25, 2009 at 03:34 AM PST #

Tor, thank you for your response. i am very happy to hear that! and more calmed :-) cheers.t

Posted by tpepitas on November 25, 2009 at 02:47 PM PST #

Post a Comment:
Comments are closed for this entry.
About

Tor Norbye

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today