Naming conventions for Java
来源:百度文库 编辑:神马文学网 时间:2024/05/23 23:46:40
If your users refer to their clients as customers, then use the term Customer for the class, not Client. Many developers make the mistake of creating generic terms for concepts when perfectly good terms already exist in the industry or domain.
This means you should maintain a list of standard short forms (abbreviations), you should choose them wisely, and you should use them consistently. For example, if you want to use a short form for the word number, then choose one of nbr, no, or num, document the one you choose (it doesn't really matter which one), and use only that one.
Although the class name PhysicalOrVirtualProductOrService might seem to be a good class name at the time (OK, I'm stretching it on this example), this name is simply too long and you should consider renaming it to something shorter -- perhaps something like Offering.
The variable names persistentObject and persistentObjects should not be used together, nor should anSqlDatabaseand anSQLDatabase.
Names will often contain standard abbreviations, such as SQL for Standard Query Language. Names such as sqlDatabase for an attribute or SqlDatabase for a class are easier to read than sQLDatabase and SQLDatabase.
This means you should maintain a list of standard short forms (abbreviations), you should choose them wisely, and you should use them consistently. For example, if you want to use a short form for the word number, then choose one of nbr, no, or num, document the one you choose (it doesn't really matter which one), and use only that one.
Although the class name PhysicalOrVirtualProductOrService might seem to be a good class name at the time (OK, I'm stretching it on this example), this name is simply too long and you should consider renaming it to something shorter -- perhaps something like Offering.
The variable names persistentObject and persistentObjects should not be used together, nor should anSqlDatabaseand anSQLDatabase.
Names will often contain standard abbreviations, such as SQL for Standard Query Language. Names such as sqlDatabase for an attribute or SqlDatabase for a class are easier to read than sQLDatabase and SQLDatabase.
Naming conventions for Java
Naming Conventions
(工作流API命名规范)workflow application programmer‘s interface (wapi) naming conventions
FCKeditor For Java/Jsp
MapXtreme for Java多少钱?
Extensive opinion surveys organized for naming candidates to CPC central committee
One java.exe for all java versions
UML For Java Programmers(1)
Roundup: Scala for Java Refugees
DWR - Easy AJAX for JAVA | Getahead
JAXP(Java API for XML Parsing)
for firefox 的Java虚拟机安装
Configuring proxy settings for the Java Runti...
Java API for XML Parsing(JAXP)演进
Obba: A Java Object Handler for OpenOffice
Google App Engine for Java ---- IBM
A Scala Tutorial for Java programmers
java.net - The Source for Java Technology Col...
用Axis 1.1 for Java进行Web Services开发(1)
Platform Name and Version Numbers for Java SE...
Java is a clean cup for an Indonesian
java for foreach while循环的比较 - nick970 - JavaE...
Third Party documentation Tools for Java and Other Languages
JAVA代码中的for (String s : args)的解释