I guess you know we already have
https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions
"Use descriptive conditions" and "Meaningful aliases" are interesting and we could indeed add 2 lines about that in the page above (just after the
link to the old Sun conventions)
I don't agree with their "Use multi-line ternary operator" rule but I don't
want to engage in a discussion about this nor all other cases.
Setters existed long ago Spring went to life ;)
Jacques
Le 08/07/2015 05:34, Ron Wheeler a écrit :
https://github.com/adaptlearning/documentation/blob/master/01_cross_workstream/style_guide.md
is a guide for coding of Adapt - Open Source course delivery tool .
I am not sure that I agree with all of the rules.
Some are much better than the ones that I would choose but perhaps I am just
too lazy to do the extra work to make my code easier to read.
They seem to think that computers have more time to parse code than people do to ponder obscurity and seem to feel that the addition of extra lines
of code to make the code clearer is worth the extra 1/1000 of a nanosecond that it costs.
"Use descriptive conditions" is an example of a frivolous waste of valuable
computer time just to save people having to think.
"Meaningful aliases" is another example of adding a line of code just to make
the code easier for humans.
If you are not offended by the waste of computer resources at compile time, you
might consider adapting some of these rules to OFBiz java.
I am not sure that they their "Don't use setters" instructions will help the DI or IoC crowd but they are JavaScript devotees who apparently do not
follow the Spring model.
Ron