[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: struts-faces
From:       Gregory Seidman <gss+struts () cs ! brown ! edu>
Date:       2003-09-17 14:01:29
[Download RAW message or body]

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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic