[opencms-dev] Naming conventions

Manfred Schenk manfred.schenk at zerobyte.de
Sun Sep 6 15:04:15 CEST 2009


Paul-Inge Flakstad schrieb:
> Hi
> 
> Just a silly question really: I've never seen the naming convention used in OpenCms, with the "m_" prefix on member variables, used in Java before. Is this a commonly used naming convention in Java? Should I follow it when writing code which may be contributed to OpenCms? If so, is this the convention below the correct one?
> 
>    1. member variables are prefixed with m_
>    2. static variables are prefixed with s_
>    3. global variables are prefixed with g_

It is not commonly used in Java I think - but I've seen it in several
cases where teams had switched from another language to java and had
kept their naming guidelines.

>From my point of view such a type indication inside a name is not needed
anymore since there are powerful IDEs nowadays.

But if one special convention is used then it should be used
consistently for the whole project.

Regards,
Manfred

-- 
| Manfred Schenk              | born between RFC638 and RFC640
| PGP-Keys unter              |
| http://www.ZEROByte.de/pgp/ | WWW: http://www.ZEROByte.de/



More information about the opencms-dev mailing list