Home arrow static arrow Java Programming [Archive] - Large Project Question
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Large Project Question
This topic has 9 replies on 1 page.

Posts:370
Registered: 8/17/02
Large Project Question  
Jul 19, 2004 8:25 PM



 
Hey guys I am working on a large project.. and it is starting to be many many files... I plan on organizing and cleaning things up... my ? is what conventions should I follow...as far as class names... package names... ect...
 

Posts:2,909
Registered: 13.8.2003
Re: Large Project Question  
Jul 19, 2004 10:39 PM (reply 1 of 9)



 
Well, classnames and package names aren't very important, what's important is design.
But in many projects where I've been the packages have been in the form of <basename><othername> so you'd have packages like: foo, foo.data, foo.database, foo.beans etc.
 

Posts:11,200
Registered: 7/22/99
Re: Large Project Question  
Jul 19, 2004 11:57 PM (reply 2 of 9)



 
There are some conventions though, have a look at this and decide what suits your style best... hardly anyone follows this doc to the letter (partly because some of the rules are ridiculous) http://java.sun.com/docs/codeconv/index.html
 

Posts:6,750
Registered: 1/25/04
Re: Large Project Question  
Jul 20, 2004 8:41 AM (reply 3 of 9)



 
my ? is what conventions
should I follow...as far as class names... package
names... ect...

Dnt abbrv xcsvly. It mks evtg hd 2 rd.
 

Posts:24,036
Registered: 2/3/03
Re: Large Project Question  
Jul 20, 2004 8:43 AM (reply 4 of 9)



 
Dnt abbrv xcsvly.

grd. t mks t mch sr t rd nd w cn spnd mr tm nswrng yr qstns rthr thn dcphrng smthng y wrt.
 

Posts:6,750
Registered: 1/25/04
Re: Large Project Question  
Jul 20, 2004 8:50 AM (reply 5 of 9)



 
Gd advs bt I ws rfrng 2 pkg n cls nms rtr tn ps 2 ths frm.
 

Posts:24,036
Registered: 2/3/03
Re: Large Project Question  
Jul 20, 2004 8:55 AM (reply 6 of 9)



 
Gd advs bt I ws rfrng 2 pkg n cls nms rtr tn ps 2 ths frm.

I figrd s mch, bt d use of d ? as sbstttn 4 a wrd bggd cmmntry.
 

Posts:441
Registered: 2/25/04
Re: Large Project Question  
Jul 20, 2004 10:16 AM (reply 7 of 9)



 
http://c2.com/cgi/wiki?MeaningfulNames

and

http://c2.com/cgi/wiki?CodingConventions

may provide some insite.

Pete

 

Posts:21,719
Registered: 98-02-20
Re: Large Project Question  
Jul 20, 2004 10:38 AM (reply 8 of 9)



 
I'm sure you're creating a lot of artifacts besides just Java source files. You need something more than just package names.

I think it's a good idea to think hard about a standard directory structure that you maintain from project to project. Create a directory name and associate a particular thing with that file name.

For example, I have a source directory under which I put all the folders containing things that I would check out of a source control system. There's a /java directory under that for .java source files (in their package directory structure), a /lib directory for 3rd party JAR files, a /logs file for logging properties, a /properties for general .properties files, /jsp for JSPs, /html for HTML pages, /bin for scripts, etc. (You get the idea).

I'll really pay off if you automate your build with Ant. You can re-use the same directory structure and build.xml from project to project with minimal changes.

%
 

Posts:1,652
Registered: 8/4/03
Re: Large Project Question  
Jul 20, 2004 12:33 PM (reply 9 of 9)



 
If you are coming along now and deciding that you really need to enforce some order on this hyper encephalic mongoloid child you've created, then one, good for you, and two why didn't you do it to start with?

It is very important to learn to think in terms of manageability. I'm not saying you won't ever move something from one package to another later, but wholescale reorganizing the project is symptomatic of a problem much earlier in the development cycle, namely that the developer(s) jumped in and started writing code without planning or design, or at least without sufficient forethought into what they were doing.

Just my 2 krupplenicks worth on the subject.
 
This topic has 9 replies on 1 page.