Subject: Re: FormBeans ... as an Interface. From: "Vic C." <[EMAIL PROTECTED]> === >>Context: >>Many intelligent people are implying that formbeans should never be a >>model/data layer. >> > > > Thanks for the compliment :-). >
You are welcome. > >>I agree with that if one does EJB with Struts. >>However, I found that sometimes it is practical that formbeans should be >>a model/data layer, by simply having formbeans delegate to DAO and not >>have actions transfer from BO or DAO. >>I myself have had great success on large projects with this approach. I >>teach this approach. And I recommend this approach to my clients. On a >>big project, KISS works magic. I found it to be more MVC. >>So... am I wise to disagree with so many intelligent people? >>This is why I started a thread. I first did Struts as per docs, the >>formbean not the model approach. >>I found that formbean as a model make Struts mode levergable and >>competitive to alterative designs. My criteria being how can a developer >>be more productive and write more attainable code. >>At least I would like people to say that there are several designs for >>formbeans use, with pluses and minuses, and not "formbeans is not a >>model". M >> >>To my clients I recommed that they use formbeans as a model. >> > > > If you do that, just be aware that you are expressly violating the purpose > for which ActionForm was created in the first place, and are also > establishing a dependency in your model classes on both Struts and the > servlet API -- which can make such classes less reusable. > > Craig McClanahan > They should use Struts IMO allways even with JSTL, etc. I know the downside of having to include the Struts JAR, and that is not good, but how many ever do that? If they do Swing (w/ JavaBean event notification) they have to carry the Struts JAR (which then lets' them do Validation). Not ideal, but simple. More likely they do SOAP from same beans that they did Struts with. V. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>