struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Recommended number of forms in one action
Date Tue, 19 Apr 2011 14:26:30 GMT
Great answer Eric!  I would also add that using wildcard methods for the
express purpose of minimizing the number of actions you have is bad
medicine.  I'm not suggesting you are, but I have seen this on client
projects where they were  more interested in check-in/check-out of a single
action than they were in doing the right thing.


On Tue, Apr 19, 2011 at 9:17 AM, Eric Lentz <> wrote:

> > I am asking because it seems that validation is only allowed for one
> > set of properties. This indicates I should create two actions
> Validation can go down to the method level and you can validate what you
> desire for that method call. Just name the .xml file (if using that
> approach) with the method name as well the class name.
> I would personally allow my decision on number of classes to be driven
> based on class purpose. I try to limit classes to a finite set of
> responsibilities, usually very fine-grained, in favor or more classes.
> This provides easier reuse, unit testing, etc. When classes get to be big
> and multi-purpose, then they get confusing and ripe for refactoring.
> If you feel you have a single purpose that a single class should address,
> then use the one class. If you are serving multiple purposes that aren't
> related (doesn't sound like your case), then don't worry about having just
> a couple lines in a class. It is okay to have lots of classes.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message