Hi Dave, Thanks for your reply. It makes perfect sense.
I should revisit my action classes and do some refactoring.... Thanks, ST newton.dave wrote: > > > Personally I tend to use multiple actions, mostly to avoid having > unnecessary action properties. For me it's easier to deal with many > tightly-focused classes (as opposed to a small number of classes with > multiple responsibilities). > > I don't think there's a right or wrong way, really--I just happen to > prefer keeping classes as light and lean as possible; they're easier for > me to read and understand that way. The negative is that I end up with a > lot of classes--but I'm okay with that. > > Common functionality often gets broken out into super-classes. For > example a recent project now has a user admin action base class with a > bunch of services used across all user admin functionality, with a > number of sub-classes that handle specific tasks. > > Bigger codespace, more lines of code. Lower cognitive overhead for each > class (although it's not always immediately obvious where shared > functionality is handled), more granularity making things easier to mock > and/or stub. > > Ah, I miss Smalltalk. > > Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Design-Practice-question.-Should-I-use-same-Action-class-for-different-functions--tp24523385p24588625.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org