aspose file tools*
The moose likes Struts and the fly likes Struts design issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts design issue" Watch "Struts design issue" New topic
Author

Struts design issue

A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Hi again all I have a somewhat different question about struts, more of a design question than a very specific issue. I have a page that has an address as well a user outline. They are allowed to change either portion, but not both at the same time. Should those each have their own form to use for validation or does it make sense to try and use the same form for both values ? I am pretty certain the answer will come back as (use a form for each value ) as that seems to follow the advice of only group things together that are related, but I want to see what others thought of the idea.

thanks in advance.
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Hi.

I'd say that it depends on your overall architecture (and time, constraints, etc). If you work with very decoupled components (including not only form-beans, but validation, actions, jsp portions in tiles, etc), it's worth and good to keep things separated (this is the best strategy). On the other hand, if you have a small application that has not been developed with such cohesion since the beginning, and is doing good (from a point of view of maintainability) and does not tend to grow much, I'd stick all data in the same form.
[ June 01, 2007: Message edited by: Leandro Melo ]

Leandro Melo
SCJP 1.4, SCWCD 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts design issue
 
Similar Threads
using inheritance in struts
struts 1 form
Issue with multiple form beans
Safe to have multiple Struts inputs with same name?
Link Only To Actions....