On Wed, Sep 17, 2003 at 01:14:27PM +0200, Adam Hardy wrote:
} I remember a while ago in one of these architecture- theme emails you 
} discussed the OO nature of struts & it had been said that the 
} action-form class and the action class broke the OO encapsulation 
} principle, by having data in one and functionality in another. You said 
} if you were going to design struts again, you would probably address this.
[...]

This is a quibble. If you want to put your functionality into your
ActionForm class, go ahead. Create an abstract ActionForm subclass that has
a takeAction() pure virtual method in it (with appropriate arguments).
Create an Action class which does nothing more than cast to your ActionForm
subclass and call takeAction(). There you go, functionality in the same
class that holds the data.

} Adam
--Greg


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

Reply via email to