Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Part II- package structure

 
Prasad Kuppa
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

For packaging the classes, here are the two approches I am thinking.

1) grouping them by tiers.
Ex.. com.fbn.(presentation/business/integration/common).xxxxxx

and for JSPs, : web.fbn.jsp.xxxx

2) other approach is package by usecases. Classes related to usecase are kept under package like : com.fbn.login.api.*****

Can anyone suggest, which one is better? I am inclining more towards First approach.


Thank you,

Prasad
[ February 14, 2005: Message edited by: Prasad Kuppa ]
 
subramanian radhakrishnan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also having similar thoughts like u on the
first approach.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasad,

I would suggest:

Divide the application into top level packages based on the functionality. Then divide each of the package into tier level packages.

There is a nice article out there at Sun's website about breaking down the application into packages.

You can also have top level breakup on the basis of tiers and then second level breakup on the basis of functional modules.

I do not think it is a good idea to map package structure to use case. It may result in mushroom growth of packages.

regards,
Deepak
 
Timothy Toe
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I spent some time searching with Google...but could not find the article.

If anyone does know of any Sun article that explains best practices on J2EE java packaging (I mean com.companyname.xxx packaging and not WAR/JAR/EAR packaging)...do let me know !.. Thanks a lot.

Looks like there's still no confident/best practice answer in this thread...

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic