• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Package structure in Struts

 
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
 
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.
 
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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic