this is a question of standard practices;
on my machine, pretty much all my projects are under a folder, c:\java.
within that folder is it a good idea to start using a folder structure like:
com\myDomainName\projectName\packageName\subPackageName.... and so on?
I mainly use eclipse, is it a good idea to stay away from that for awhile?
Using a domain name for package names is a common practice to avoid having two libraries conflicting. If you're just practicing, you can keep it simple.
com.domainname.projectname.persistence ==> Keep all classes to database operation
com.domainname.projectname.controller ==> Keep all your interface based class
com.domainname.projectname.utilities ==> Keep all your utility methods.
Originally posted by satsranchuser:
This is the fifth time, I have changed my name. I really did not get the naming policy at all. Please help with the same. I tried display name to be my fist-name with initials, last name with initial, first name-last name, javaranch user name. But I get whacked for everything :-). Please advise
Your current screen name, "Sathish Kumar", currently should pass -- meaning you should not be whacked...
There is some talk about disallowing "smith", "doe", "kumar", and other names that get abused (ie. ficticious), but it is okay for now.
I'm revisiting this because I'm starting to work out of a book that uses JUnit. They suggest having all your source files under a structure of c:\java\src\com\domainname\packagename and c:\java\test\com\domainname\packagename.
So let's say I just start a new project that will have one class and one test; will the workspace be c:\java\src, and when I create a package I'll call it com.domainname.packagename. Will that work? should I start all my projects in the workspace of c:\java\src and then create the package names as above?