one, The content of the note () is their own spit groove
Ii. Naming Conventions
- cannot start and end with an underscore or dollar Symbol. counter example:_name, $name, name_,name$. (i've never used it this way.)
- You cannot use phonetic and English combinations to name Them. Not to be named after Pinyin (english rotten, sometimes made such mistakes)
- Class name adherence to hump rules (observed)
- Method name, parameter name, member variable name, local variable name uniform lowercamelcase format (observed)
- Constant capitalization, the words are separated by underscores, and to express a clear meaning, a long point can be (has been observed)
- abstract class naming using Abstract or base, the exception name ends with exception, and the test class name ends with the class name +test (not previously Written)
- the array definition takes string[] args format (always the Same)
- The Boolean variable of the Pojo class cannot be started because some frames cannot be parsed (observed)
- The package name is lowercase and only has a natural semantic English word (my understanding is only one word). The package name is in the singular form (has been complied With)
- Eliminate all non-canonical abbreviations (have been complied With)
- If a design pattern is used, a specific format is shown in the class name, such as Orderfactory,loginproxy. (has been complied With)
- the methods and properties of an interface class cannot be added with any modifiers, including Public. Keep your code neat. Add a valid Javadoc Comment. Try not to define variables in the Interface. Unless it is related to an interface method. (add Public before , correct later)
- Implementation classes for service and DAO classes are distinguished by impl suffixes and interfaces (observed)
- enumerating class names suggests taking the Enum SUFFIX.
- 15. "reference" to the naming conventions of each layer:
A) Service/dao Layer Method naming protocol (sorry I often suffix)
1) the method to get a single object is prefixed with Get.
2) the method to get multiple objects is prefixed with the List.
3) the method that gets the statistic value is prefixed with Count.
4) Insert the method prefix with save (recommended) or Insert.
5) Remove the method prefix with remove (recommended) or Delete.
6) the modified method is prefixed with Update.
B) domain Model naming conventions (not yet Used)
1) data object: xxxdo, XXX is the data table Name.
2) data transfer object: xxxdto, XXX for the business domain related Names.
3) display object: xxxvo, xxx is generally the name of the Web Page.
4) POJO is a general term for do/dto/bo/vo, and is forbidden to be named Xxxpojo.
Thoughts on the Java naming specification