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.

David






From: Erik Hatcher <[EMAIL PROTECTED]>
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: Struts Developers List <[EMAIL PROTECTED]>
Subject: Re: subclassing frustrations
Date: Thu, 05 Dec 2002 15:55:16 -0500

Jason Rosenblum wrote:
Erik,

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
implementations.
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: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to