This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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.
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.
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
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.