问题
what should be the standard naming convention of a package which contains a servlet class? if my project name is "Employee" and I work in company "XYZ" , then what should come in this: com.xyz.employee.__
回答1:
There is no standard naming convention (other than the name should be in lowercase). Choose what is the most logical to you.
Classes are typically arranged by technical and/or functional domain. So the servlet could be in a package
com.xyz.employee.web
(all the web-related stuff of the app), orcom.xyz.employee.salary
(all the salary-related stuff of the app), orcom.xyz.employee.web.salary
(all the salary-related stuff of the web technical domain), orcom.xyz.employee.salary.web
(all the web-related stuff of the salary-related functional domain).
来源:https://stackoverflow.com/questions/19976129/standard-naming-convention-for-servlet-package