Below are some guidelines for package naming and structuring:
Follow these java package naming conventions:
Structure your packages according to their functional role as well as their business role
- Break down your packages according to their functionality or modules. for example com.course.module.lesson
- Do not created too many packages if you have fewer classes in the package
- Avoid going overboard with structuring, avoid separate packaging for exceptions, factories, etc. unless you have to .
- If your project is small, keep it simple with few packages. e.g. com.course.module.lesson1 and com.course.module.lesson2
- Consider build and distribution when naming ( this will allow you to distribute your api or SDK in a different package, see servlet api)