struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <>
Subject Re: subclassing frustrations
Date Thu, 05 Dec 2002 22:06:57 GMT
I agree that Struts needs more interfaces.  I think some classes aren't 
interfaces to force you into good design (ie. your form beans can't be model 
classes).  I disagree with that approach and find it somewhat condescending 
to experienced programmers.

My approach would be to make many things interfaces with some standard 
implementations to allow easier extensibility.  This would also allow people 
to design poor systems if they abused this freedom.


>From: Erik Hatcher <>
>Reply-To: "Struts Developers List" <>
>To: Struts Developers List <>
>Subject: Re: subclassing frustrations
>Date: Thu, 05 Dec 2002 15:55:16 -0500
>Jason Rosenblum wrote:
>>One simple hack is to layer your base Actions on top
>>of the pre-defined Actions. You could change your
>>Struts code such that LookupDispatchAction subclasses
>>BaseAction or BaseAdminAction. It's not convenient but
>>it should work.
>I'm not sure I follow.  To invert the inheritance (without modifying Struts 
>itself) would require me to copy LookupDispatchAction into my code (and I 
>did this, as BaseLookupDispatchAction) and have it subclass from my primary 
>base class, such as BaseAction.
>Or are you suggesting something other than this?
>>Actually, it would be a nice feature if you could
>>supply Struts with the type of your Action class, but
>>i guess this would only work if there was an Action
>>interface and an Action factory to create different
>Yeah, there are lots of ways to accomplish this, but at the very least an 
>Action really should simply be an interface since its stateless and the 
>idea is to just implement execute() yourself anyway.
>I haven't thought through how this should be done differently, just that 
>this situation is currently frustrating.
>	Erik
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 

Tired of spam? Get advanced junk mail protection with MSN 8.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message