• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

organizing java projects

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?
thanks,
jason
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, you should keep package names all lower-case
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.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hold separate packages based on your operation
for example
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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Talking about naming, could you read the Naming policy and change your name accordingly ? Thank you
 
sathish kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



Sathish,

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.

Henry
 
Edmund Castermund
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?
thanks,
jason
 
reply
    Bookmark Topic Watch Topic
  • New Topic