incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <>
Subject Re: Coding conventions
Date Tue, 11 Jul 2006 16:03:36 GMT
On 7/11/06, <> wrote:
> Hello again,
> I got some more question regarding coding rules.
> For control block with a single line of code, should we use brackets or
> not? Currently, I see both, but not using the brackets seems to be the
> most common.

It's not a strictly enforced thing;  in general, for a simple "if"
followed by one line, I don't much care for the braces - they
don't make the code more readable.  But for an "if"-"else",
if one case requires a brace the other should have braces

Regarding nested classes, are those encouraged when they are strongly
> coupled with with their enclosing class or should they be converted in top
> level classes?

If they're very strongly coupled - and one is clearly the primary class
and the other the helper class - I like using inner classes.  Make
inner classes static whereever possible (would that we'd gotten
that right back when the EG did StateManager.SerializedView....)

Anyway, neither of these are absolute, codified rules.

-- Adam

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message