On Fri, 14 Jun 2002, Struts-dev Newsgroup wrote:
> Date: Fri, 14 Jun 2002 09:25:01 -0700
> From: Struts-dev Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: FormBeans ... as an Interface.
>
> Subject: Re: FormBeans ... as an Interface.
> From: "Vic C." <[EMAIL PROTECTED]>
> ===
> We can solve the tech issues, if architecture makes sense as an altertive.
> Techonlogy should not be just for the sake of technology.
> The position last was that it is leightweight and people could apply it
> as they see fit.
> Please just keep the option open and not "over my dead body".
> V.
>
There would be fatal flaws in making this change -- most importantly,
backwards compatibility is so vital that the technical issues almost don't
matter. But there are technical flaws as well, and nobody has shown me
any compelling solutions to the following problems if you were to use a
model object as a form bean:
* Dealing with incorrect input and being able to reproduce
it, exactly as the user typed it. This is a fundamental
user expectation of interactive systems.
* Dealing with type conversion errors as the form bean is
populated, if your model object properties are not Strings.
* Dealing with the fact that your model bean's properties get
updated even though validation has not been successfully
completed, so it may now be semantically incorrect.
* Dealing with the coupling issues -- changes to the UI
now require involving your model layer developers.
* Dealing with the fact that your model beans would now be
tied to the Struts (and therefore servlet) APIs, which
reduces the ability to reuse them in non-web environments.
All of these issues were motivations in defining the role an ActionForm
takes in the Struts architecture (the server-side representation of the
client side UI objects), and the reason it is a class instead of an
interface -- to strongly discourage people from this exact practice.
Long time subscribers to Apache mailing lists will recognize that I am
rarely this adamant in my postings -- but this proposal is a really really
bad idea. I am not interested in allowing Struts to encourage the
problems that ActionForm as an interface would inevitably lead to.
If you want to modify your copy of Struts to make ActionForm an interface,
feel free ... that's why it is open sourced under a permissive license.
But remember, your apps will not be compatible with the standard Struts
release any longer, so you'll be on your own.
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>