• 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 in Struts

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm looking for some best practice advice here. I am starting on my first Struts project of any substance. Previously I have always had everything in the same package: formbeans, actions, utility classes, and other beans. I am thinking that if all of these files are in the same package, it's going to be a pain to find one in particular.

So does it make sense to have seperate packages for beans, actions, utilities, etc? Does this pose any problems or headaches?

Thanks
 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Packaging is important, especially in big projects. Even in small projects, it makes sense to package classes.

How you choose to package classes is however a matter of debate.
- The conventional approach would be as you have thought "seperate packages for beans, actions, utilities".
- However some people advocate packaging as per functionality rather than type of classes.

In any case, I have not faced any problems/headaches because of packaging.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yap thanx for you answer.
I know that its hard and anyone can have and like his own convention but why to reinvent the wheel again ?
Can anyone post here some example that he uses/found somewhere and thinks its quite a good way how to dont get lost.

Appreciate
reply
    Bookmark Topic Watch Topic
  • New Topic