standard naming convention for servlet package?

爱⌒轻易说出口 提交于 2019-12-11 06:41:26

问题


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), or
  • com.xyz.employee.salary (all the salary-related stuff of the app), or
  • com.xyz.employee.web.salary (all the salary-related stuff of the web technical domain), or
  • com.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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!