On Fri, 22 Jun 2001, Cook, Levi wrote:

> Ahhh, now I follow what you were saying.
> 
> I think both event dispatching mechanisms exist becuase they provide support
> for semantically separate issues. The first form is notification that
> something "interesting" just happened. The second form is the prevention of
> placing an object into an invalid or inconsistent state.
> 
> Actually, this really goes back to the JavaBean specification where bound &
> constrained properties are defined. This ultimately leads me to question
> whether its appropriate, and beneficial to treat ActionForms as JavaBeans
> (aka. java's component architecture for building modular software
> components)?
> 
> The benefits for treating forms as Beans would generally be described as:
>   1) are usable by programming tools 
>   2) follow a standard naming convention 
>   3) have a conscise public interface 
>   4) helps keep the learning curve shallow
> 
> To bean or not to bean, that is the question :)
> 

An important reason that ActionForm classes should (at least) conform to
the standard naming conventions is that the automatic population of
properties from request parameters relies on this.  Otherwise, the bean
will not be recognized as having a property that matches.

However, Struts currently does not deal gracefully with things like a veto
exception on a constrained property.  We'll need to decide what we want to
do about those.

> Any other ideas or opinions on this?
> 
> -- Levi
> 

Craig

Reply via email to