struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric Dumoulin" <cedric.dumou...@s1.com>
Subject Interfaces vs base classes
Date Mon, 13 Nov 2000 13:26:59 GMT


  I would like to know why Struts uses base classes rather
than interfaces with default implementations.
  
As example, I am interested to know why ActionForm is an abstract
class rather than an Interface (as in previous Struts versions).
  Could you explain me the  reasons ?

 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 ?

  Cedric

Mime
View raw message