• 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

struts design

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
i am developing a application in which the user interface for 3 screens are the same but they have slightly different functionalities. is it a good idea to have the same action class and form bean for them
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one suggestion. If i were you before i decide i would consider

If this app going to be used for a short time and you are sure about the functionaliy or is this going to be used for long time.

If short time then what you say now is right.

If long time then you have to consider if you will be adding additional functionalities to individual screens as you go.
If yes then go for seperate so it will easier in future.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While having them separate is easy for maintenance. It also introduces some redundancy.

Some things to consider:

Even for long run, there are advantages to have same action and form.

If there is some common processing logic that needs to be in the action class,
it need not be duplicated.

The same form can be used. If there are some additional fields are required for one page but not others.
It can be added to the form class. Other pages will not use them.

Also consider the general practice in your company. It pays to be consistent.

I hope you have enough information to make a decision now.
 
reply
    Bookmark Topic Watch Topic
  • New Topic