| jyaga://name definition |
Sun's Java Name Definition is fully respected for Java development. All Java packages named using lower case characters with no any separators preferably as one word. All Java packages have a root package named jyaga. Classes could be a combination of many words or one word. Each word starts from capital character. Abbreviations shouldn't contain all capitals but just first one. Here are examples of package and class names:
|
Right: jyaga.service.XmlConverter |
Wrong: jyaga.mypackage.myClass com.jyaga.service.XmlConverter jyaga.service.XMLConverter service.XmlConverter |
Fields should be named using one or many words with no separator and first word with small case and all others should start with capital character. Abbreviations should contain only first capital character in case it is not first part of the name and all caps in case if the abbreviation is a first part of the name.
|
Right: fieldName xmlField fieldXml |
Wrong: Name
NAME
FieldName XMLfield fieldXML field_xml |
Names of final class members (constants) should be all capital using underscore (_) as separator between words as needed.
|
Right: CONSTANT |
Wrong: MYCONSTANT
My_Constant my_constant |
|
Right: equals setHtml |
Wrong: GetMyField
getMy_Field GETMYFIELD setHTML
|
Name of database should contain only small characters and preferably contain only one word. If the name must contain more than one word it should be separated by underscore (_).
|
Right: |
Wrong: |
For tables name in database should be used only small characters. Words of table name should be separated with underscore (_).
|
Right: name |
Wrong: TABLE_NAME TableName |
Columns of database table should contain only capital characters. Words should be separated by underscore (_).
|
Right: COLUMN_NAME |
Wrong: id
ColumnName Column_Name |
JSP pages should use the same definition as Java Classes. Only XML syntax of JSP should be used.
|
Right: MyHtmlPage.jspx |
Wrong: my_page.jsp
MY_PAGE.jsp |