• 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

Package structure questions

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
My cellmate was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic