aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Package structure questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Package structure questions" Watch "Package structure questions" New topic
Author

Package structure questions

subramaniam vaidyanathan
Greenhorn

Joined: Jun 25, 2001
Posts: 10
Hi,
I am working on a project which involves ejbs and regular java classes.. Our team seems to have agreed on a package structure like
com.myproject.mymodule.classes.(the class files here) and com.myproject.mymodule.ejb.myejb.(the ejb files here)
This package structure starts under a folder called code.. There is another team which prefers a package structure like
code/ejb/ com.myproject.mymodule.myejb.(the ejb files here) and
code/classes/ com.myproject.mymodule.(the class files here)
Which of these is the better one? Why? We are working with Weblogic.
anup vachali
Ranch Hand

Joined: Oct 17, 2000
Posts: 54
I think the first option is better.... this is just a personal opinion and i cant back that up with any good or bad experiences.
Seems to me that both are basically the same ...just a matter of whether the ejb/classes come at the end or at the beginning. Ss far as WebLogic goes I dont think it matters.
Anup.
vetrivel krishnaraj
Greenhorn

Joined: Jun 07, 2001
Posts: 3
Hello,
There is no difference in the performance of the code if u declare either way.The point is it should be logical and it should be in such a way that it can be understood by others easily.Even i would suggest the first way of declaring is more logical than the second one.
regards
vetri
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16143
    
  21

Actually, as a total knee-biting nit-picking sour-minded academic mote-counter, I'd have to say that putting qualifiers related to implementation ("classes", "ejb") into a package name is a Bad Thing. We should all be working with Abstract Concepts.
In may case, though, I HAVE to be abstract. I do a LOT of on-the-fly refactoring which may make my code cleaner and more efficient, but doesn't get a working product out the door real fast. Hungarian notation doesn't work for me - booleans may become enumerations, integers may become error-code classes, classes may collapse into booleans. So if I'm carrying implementation freight, the program source would otherwise turn into anti-comments.
On the other hand, if you have a team of people running around all day trying to find what part of the system modules are hiding in, you might find it more effective to say so in their package names.
What's most important is consistency. As long as everyone agrees on the basic setup, it will make it easier for them to get the job done.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Package structure questions