jyaga://name definition
 

Java Code

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.mypackage.MyClass
jyaga.service.XmlConverter

Wrong:

jyaga.my_package.MyClass
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:

name
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:

MY_CONSTANT
CONSTANT

Wrong:

MYCONSTANT
My_Constant
my_constant

Names of methods of classes should start with small character. Preferably first word of the name should be verb. All other words should start with capital with no separator. In abbreviation only first character should capital.

Right:

getMyFieldMethod
equals
setHtml

Wrong:

GetMyField
getMy_Field
GETMYFIELD
setHTML


Data Base

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:

dbname

Wrong:

DBName


For tables name in database should be used only small characters. Words of table name should be separated with underscore (_).

Right:

table_name
name

Wrong:

tablename
TABLE_NAME
TableName

Columns of database table should contain only capital characters. Words should be separated by underscore (_).

Right:

ID
COLUMN_NAME

Wrong:

id
ColumnName
Column_Name


JSP

JSP pages should use the same definition as Java Classes. Only XML syntax of JSP should be used.

Right:

MyPage.jsp
MyHtmlPage.jspx

Wrong:

my_page.jsp
MY_PAGE.jsp