On Tue, 30 Apr 2002, Struts Newsgroup wrote:
> Date: Tue, 30 Apr 2002 10:25:01 -0700
> From: Struts Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: DynaActionForm example
>
> Subject: Re: DynaActionForm example
> From: Vic C <[EMAIL PROTECTED]>
> ===
> Controller I use as contoling where to go(next page), navigation, and
> what to do,to ask the bean to populate, to save, etc, be end point for
> all errors, exceptions, set FKs on inserts, ask for validation, etc. but
> not for DAO.
>
> By using the FormBean as a model (form bean has the DAO) instead of as
> the view(the controler has the DAO) I avoid the need to re-map
> properies. To me that is cleaner MVC than if the Controller has DAO.
> What if you need to re-use the beans elswhere? DAO could be anything,
> even EJB. I tried using action for DAO at first apps. Then I found it
> cleaner to do JavaBeans as DAO.
>
You are welcome to like using form beans to access your model directly.
Just as long as you remember that it's *your* approach that is not
considered a "best practice" by those who created Struts in the first
place.
> From a practical applied point. I like formbeans over dynabeans, I like
> FormBean as a model. It is simpler to use the Beans as the model, than
> in esence have 2 sets of beans. If that is the problem dynabeans is
> solving, with ValueObject, etc.... again, dynbeans are not realistic
> enough for a real world application, IMHO. Struts should remain a light
> weight simple framework hopefully, it should not start imposing, so
> people can use JavaBean as FormBeans.
Never gonna happen ... at least as long as I've got a vote on the
STRUTS-DEV list! :-)
ActionForm is a class (rather than an interface like it was originally)
precisely to discourage people from doing what you want to do. Form beans
exist for one and only one purpose -- represent the user's input values.
> Some very complex applications that are well architeced and done quickly
> in Strtus becuase of the OO and MVC capabilities of Struts.
>
Gee, that can be said of apps that use form beans in the recommended
manner as well ;-).
> Vic
>
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>