struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric Dumoulin" <>
Subject Re: Interfaces vs base classes
Date Mon, 13 Nov 2000 15:32:41 GMT

  Hi Matthias,

  I don't want to restart a thread on something that has already been discuss.
  I have certainly miss something ;-)
  Could you please give me pointers to this thread ?


Matthias Kerkhoff wrote:

> Hi Cedric,
> >  For my point of view, it seem that using base classes
> > rather than interfaces close some doors in this case : With a base
> > class, you "have to" extends the class, which forbid any others classe
> > inheritances. But, an ActionForm is used to expose properties from, lets
> > say, business logic objects (BO). So, you must implement your action
> > form with a delegate of your BO. If later you modify your BO
> > (customization for a new client), you need to modify your action form.
> > This will not happen if your action form can extend the BO (or its data
> > representation), and use a delegate for the ActionForm interface. So,
> > why closing this possibility ? Do I miss something ?
> I have the same problem and would prefer the more flexible solution
> that Sun has choosen for such situations. As an example, I would like
> to mention Tag/TagSupport or BeanInfo/SimpleBeanInfo.
> Having a mandatory interface and a optional base class leaves the
> decision to the developer.
> He/she can choose either
> - to implement the interface, if full flexibility is needed, or a base
>   class already exists; or otherwise
> - to extend the default base class and minimize the own development efforts.
> However, there has been a long discussion  some weeks ago on this list
> (or was it in Struts-Users?), if ActionForm should be a base class or
> an interface. It's probably not a good idea to restart this thread again.
> --
> Matthias                        (

View raw message