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.
posted 8 years ago
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 ]