On Wed, 16 Mar 2005 12:47:51 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >I agree with Ted, and the reasoning he states. Indeed, in this > >particular respect, Action *should* be inflexible because making it an > >interface would encourage you to use it incorrectly. > > I disagree. Actions are not fine the way they are. They depend too > directly on the Servlet API, which is one of the reasons they are too > hard to unit test. All of the important support methods depend on an > HttpServletRequest or the servlet property which is set at > initialization time. > > I understand the historical reason for these things being as they > are, but that doesn't mean that there isn't room for improvement. > These improvements don't all have to happen today, but I believe they > can be made without sacrificing compatibility. I wouldn't have a problem with an interface for Actions or ActionForms at this point in time. Most people will continue to use (or abuse) the base classes anyway. I just meant a framework member to represent Actions as opposed to any-old POJO class is a helpful notion for a front-controller framework. A very cool idea would be to apply the Action interface to an ActionForm, and then you'd have a WebWork/JSF type paradigm. (Of course, you can do this now, just by using a standard Action to call an Execute method on your subclass of ActionForm.) -Ted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]