Dushyant Gupta
Dushyant Gupta

Reputation: 515

standard naming convention for servlet package?

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.__

Upvotes: 1

Views: 2605

Answers (1)

JB Nizet
JB Nizet

Reputation: 692121

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).

Upvotes: 2

Related Questions