servlet包的标准命名约定? [英] standard naming convention for servlet package?
本文介绍了servlet包的标准命名约定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
包含servlet类的包的标准命名约定应该是什么? 如果我的项目名称是"Employee",而我在"XYZ"公司工作,那么应该出现以下情况: com.xyz.employee. _ _
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.__
推荐答案
没有标准的命名约定(名称应使用小写字母).选择最适合您的逻辑.
There is no standard naming convention (other than the name should be in lowercase). Choose what is the most logical to you.
类通常按技术和/或功能领域排列.因此,该servlet可以放在一个包中
Classes are typically arranged by technical and/or functional domain. So the servlet could be in a package
-
com.xyz.employee.web
(应用程序的所有与网络相关的内容),或 -
com.xyz.employee.salary
(应用程序中与薪资相关的所有内容),或 -
com.xyz.employee.web.salary
(网络技术领域中与薪资相关的所有内容),或 -
com.xyz.employee.salary.web
(与薪资相关的功能域的所有与Web相关的内容).
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).
这篇关于servlet包的标准命名约定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文