(reprint) Table, class, package, JSP naming conventions in projects

Source: Internet
Author: User

For Java (including in the JSP) code, the class names are all used Pascal notation, the first letter of each word capitalized, parameters, methods are used camel notation, the first letter is lowercase, can not abbreviated are not abbreviated!

Project name = database name

Table 1 Each table corresponds to a list of features, the English word for the feature list is the name of this table, note that when there are multiple words, you want to use underscores, all lowercase. Head_image
Table 2 Introduction
Table 3 Partner
Table 4 Dynamic
Database Table 5 Team_culture
Table 6
Table 7
...
Bean Layer

Each layer is a package, and the name of the package is com. database name. Layer name , all lowercase.

(Exception one is named by the company)

Com.creator.bean
Logical layer DAO layer Com.creator.dao
Service Layer Com.creator.service
Servlet layer Com.creator.servlet
In the face of the administrator: corresponding to which table, the name of the table + operating word as the name of the JSP, Pascal named law headimagelist.jsp (list)
headimageadd.jsp
Jsp headimagemodify.jsp
headimagedelete.jsp
headimageinfo.jsp (Details)
Display Layer headimagesearch.jsp
User-facing: all lowercase, with multiple letters and no delimiters. Index.jsp (Home)

Original Address http://blog.csdn.net/yangyang8673870/article/details/7334022

For Java (including in the JSP) code, the class names are all used Pascal notation, the first letter of each word capitalized, parameters, methods are used camel notation, the first letter is lowercase, can not abbreviated are not abbreviated!

Project name = database name

Table 1 Each table corresponds to a list of features, the English word for the feature list is the name of this table, note that when there are multiple words, you want to use underscores, all lowercase. Head_image
Table 2 Introduction
Table 3 Partner
Table 4 Dynamic
Database Table 5 Team_culture
Table 6
Table 7
...
Bean Layer

Each layer is a package, and the name of the package is com. database name. Layer name , all lowercase.

(Exception one is named by the company)

Com.creator.bean
Logical layer DAO layer Com.creator.dao
Service Layer Com.creator.service
Servlet layer Com.creator.servlet
In the face of the administrator: corresponding to which table, the name of the table + operating word as the name of the JSP, Pascal named law headimagelist.jsp (list)
headimageadd.jsp
Jsp headimagemodify.jsp
headimagedelete.jsp
headimageinfo.jsp (Details)
Display Layer headimagesearch.jsp
User-facing: all lowercase, with multiple letters and no delimiters. Index.jsp (Home)

For Java (including in the JSP) code, the class names are all used Pascal notation, the first letter of each word capitalized, parameters, methods are used camel notation, the first letter is lowercase, can not abbreviated are not abbreviated!





(reprint) Table, class, package, JSP naming conventions in projects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.