Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package structure in Struts

 
Clifford Adams
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • 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
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • 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.
 
Peter Laurinec
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic